Anyone know how I can change a SSIS variable at runtime?
I have a variable User:SkipStuff
I want to set this based on a condition during a for loop container
Click a variable in the list, and then click Move Variable to change the variable scope. In the Select New Scope dialog box, select the package or a container, task, or event handler in the package, to change the variable scope. For more information about variable scope, see Integration Services (SSIS) Variables.
Use Expression Task instead. In the "Expressions" pane, put the variable to set on left, then equates it to the intended value.
@[User::VariableToSet] = some expressions...
You can add a Script task. Add your SSIS variable(s) to the ReadWriteVariables property in the Script Task Editor.
You can reference the variable(s) in your script using the following format: Dts.Variables["MyCaseSensitiveVariableName"].Value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With