Need to create a condition stmt in a DTS package

  • I need to execute a package depending on a condition from a sql statement.

    If the following statement is true:

    IF select dbo.DateToISOStd((GETDATE()-1)) = select dbo.DateToISOStd((select max([Inv/So _Date]) from ROI_Sales))

    THEN execute a DTS procedure for the true condition.

    ELSE email an alert to the admins.

    I guess I would need to create a sp with this in it and then manually execute a DTS package on the true condition.

    Can you exexcute a DTS package in a sql statement?

    Thanks

    Kevin

  • You can run the package from the parent package.

    You can also run DTS from from SQL Statement either as a job sp_start_job or as a command-line executable xp_cmdshell dtexec <parameters go here>

    Regards,Yelena Varsha

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply