• When you assign a result set to a variable, you're using a special type of variable (I think the type is called Object) that can hold a result set. All other types in SSIS are scalar - they only hold a single value. You're mixing your variables. If you want to save your result set to a variable, you will then need to have a task that loops through the rows in the result set (even if there's only one). But if you use output variables in the parameter mapping tab instead, you can use those values as inputs to your next Execute SQL task.

    I hope that makes sense.

    John