Executing a particular branch of SSIS package depending on value of a variable (1, 2, or 3)

  • I have  a package that has Execute SQL task.  SQL Statement assigns a value to a variable  iFlowVar (values are 1, 2 , or 3).
    I have 3 subsequent DataFlow tasks  DF1, DF2, and DF3.
    I need to
    execute DF1 only if iFlowVar = 1   | and not execute DF2 and DF3.
    execute DF2 only if iFlowVar = 2    |  .....
    execute DF3 only if iFlowVar = 3    |  .....

    What is the best way to achieve this?   Its an equivalent of multiple IF statements in any programming language.

    Likes to play Chess

  • Check out this blog on Working with Precedence Constraints, specifically the section on Defining Workflow by Expressions.

    Also, the conditions are mutually exclusive, so you only need to check that it meets the specific condition not that it doesn't meet the other conditions.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

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

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