Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005

    Post Unanswered: conditional execution of the next job in DTS

    I have a job which exports and emails the data from a table (subject to some conditions) . The data is exported to a test file. I donot want to send the email if there are no rows exported. or the filesieze is 0. Otherwsie I want to send the email with this text file as attachement.

    Any ideas?


  2. #2
    Join Date
    Dec 2004
    CA, USA

    Use ActiveX Scripting

    You can turn steps on or off. See the topic titled "Using ActiveX Scripts in a DTS Workflow" in BOL.

    Also the topic "Using ActiveX Scripts in DTS" may be helpful.


  3. #3
    Join Date
    Feb 2004
    San Antonio, TX
    activex in dts is single threaded in dts and slows all kinds of stuff down.
    try using any built in task first if you can.
    if you want to try something trick, try the mesage queue task.
    you can provide if logic for rows returned in an execute sql task and if successfull have the on success run an xpcmdshell from the sql task/
    or try a data driven query task ++++ place if logic in the query
    if rows returned then transfer to text
    if no rows returned then raiserror

    Books Online {Data Driven Query Task}
    Books Online {Execute SQL Task}
    Books Online {Message Queue Task}
    Books Online {DTS tasks, overview}

  4. #4
    Join Date
    Jan 2005

    conditional execution of the next job in DTS --Thanks

    Phil/Ruprect: Thanks for your replies. I was using logic in sql (Execute SQL Task) to initiate the next step but the table has grown to 15 M rows. I plan to use activex script to just check the size of the output file (Thanks to site for the script) and accordingly initiate the next job.

    Thanks again for the replies.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts