Bypassing SQL Tasks

  • Is there a way to bypass certain SQL tasks in a package if certain criteria are not met? Basically pass the tasls a value that says they have been executed even though they have not.

    Does anyone have an example?

  • one way to get around...

    Eg. say you 3 sql tasks as shown below and Task2 is the one to bypass

     

    Task1-----------> Task2------------->Task3

    From task1 - output a value to a global variable

    from task2 -  input the value from global variable then do a validation check. If condition not match do nothing (task will run but nothing happened).

    Task3 will just pick up from task2 regardless.

     

  • There are some good examples of this on SQLDTS.com

    See http://www.sqldts.com/default.aspx?214 for some sample code.

  • Use a workflow Active-X script on your SQL Task (task 2).  Check a global variable set in task 1.  If the vaiable is set have you Main function execute the task.  If not set Task 3 to a state of Waiting and set Task 2 to Do Not Execute Task.

    -Mike Gercevich

  • Use a workflow Active-X script on your SQL Task (task 2).  Check a global variable set in task 1.  If the vaiable is set have you Main function execute the task.  If not set Task 3 to a state of Waiting and set Task 2 to Do Not Execute Task.

    -Mike Gercevich

Viewing 5 posts - 1 through 4 (of 4 total)

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