The Sql To Variables Action loads variable values from a SQL or Database table record set, using the first field for variable names and the second field for variable values, while ignoring any additional fields.
SQl Example
Note: This SQL will create two variables #Name# and #Email#
Metadata tab
The Write Variables option ensures that the “Package Action” logs the variable values into the “Action vars before log file” before the action is executed and logs the updated variable values into the “Action vars after log file” after the action completes.
This option is typically used for debugging and is not recommended in a production environment.
It can be globally disabled through the
options dialog
.
Parameters tab
Tips
The “Replace Variables” parameter is used to substitute variables within SQL statements.
When the “UseEmbeddedSQL” is set to True EmbeddedSQL is used, otherwise SQL Script/Lookup is used.
Selecting Script
Editing Script
Selecting Connection
Variables tab
The Variables tab defines the variables to be updated during the action’s execution.
Tip: double click on the variable name to disable/enable it
Execution log tab
The Execution log tab is populated after the action is executed. Double click on the row to view the log.