Option | Description |
---|---|
SQL script to execute |
Enter the SQL to execute. Separate statements with a semi-colon ( ; ) and use question marks as placeholders for parameters. The given parameters must be enclosed correctly. Numeric values do not need to be enclosed, but all others (for example, strings) must be enclosed with single quotation marks ( ' ) or double quotation marks ( " ) depending on the database dialect. The Bind parameters? and Quote Strings? options (explained below) are also allowed. |
Execute for each row? |
|
Execute as a single statement |
Select this option to send the entire SQL statement to the database. Leave this option unselected to split the statement semi-colons ( ; ). |
Variable substitution | Select this option to include the use of variables in the SQL (for example: ${table_name} ). |
Bind parameters? |
Select this option to bind parameters using prepared statements. Leave this option unselected if you want this step to perform a string replacement of the parameters. Note: To use this option, the Execute for each row? option must also be selected.
|
Quote Strings? |
Select this option to add quotation marks ( " ) around the string according to the database dialect and escape special characters like CR, LF, and " ". Note: To use this option, the Execute for each row? option must also be selected.
|
Parameters |
There are two ways to populate the parameters:
Using a Select Values step, you can duplicate field values within the Select & Alter tab by selecting the value once and renaming it a second or third time. To use this option, the Execute for each row? option must also be selected. |
Get Fields (button) | Click to automatically populate the parameters in the Execute SQL Script with the same parameters that are specified in the transformation step previous to Execute SQL Script. |
The Execute SQL Script step has the following options: