• In the for each loop container, you need to map the current value to a variable.

    This variable is then used in the second Execute SQL Task.

    You can put a breakpoint on the execute sql task and inspect the value of the variable before it is executed.

    If the parameter mapping with the question mark is troublesome, you could create another variable, SQLQuery, and put an expression on that variable.

    For example:

    "EXEC SP101 'LIVE','" + @[User::myVariable] + "' "

    In the Execute SQL Task, you use this variable as the source for the SQL statement.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP