Running different tasks inside for each loop depending on input variable

  • Hi

    I'm a SSIS newbie so please bear with me.

    I've got a for each loop container that I'm using to enumerate an xml file. If the variable is "Y" then I want it to do a specific task, if it's "N" then I want it to do something else.

    I initially set it up as a Script task and stated if the variable = "Y" then it was a success and carried on, if it was "N" then it failed and did the separate task, but it doesn't carry on enumerating the file after it finds the first "N".

    Is there a better way of doing this?

    Cheers

    Lbob

  • You can use expressions in the precedence constraints to read the value of the variable and split the control flow depending on the variable's value.

    Format for expression:

    (@VariableName)=="Y"

  • Thanks, it worked a treat.

    Lbob

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

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