This action is for advanced users and allows the workflow to run a SQL command.
To use the workflow action:
Locate the action in Workflow Actions Toolbox (located on the left hand-side);
Select the action, drag it onto the design canvas and drop it onto a design pearl.
Alternatively
To change the settings used by the action:
For more information on the other options in the drop-down, please refer to the Getting started with the Nintex Workflow designer.
Options for this action
Connection String
A SQL connection string to use when connecting to the remote database.
Provider options are:
For example: Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;.
Use windows authentication
Determines that the connection to the database will be made using integrated authentication (trusted connection). When using integrated authentication, username and password fields are presented to allow the credentials of an account with sufficient database access to be provided.
Query
Enter the SQL statement directly and/or use Insert reference fields to build the string dynamically at run time.
Escape reference values for use in strings
Use this option to ensure that any value chosen from the Insert Reference button is escaped for use in a SQL string. If the entire SQL statement is contained in a single variable, then this option must be unchecked.
Store default result
Returns the result of a SQL 'select' query.
Store result in
This list contains all the workflow variables that can be used to store the result of a SQL ‘select’ query. A collection variable can be used to store multiple records. If a variable that is not a collection is selected, only the first record will be stored. If multiple columns are returned, only the value of the first column will be stored.
Specify column names
Use this option to store the result of specific column name that is returned from a SQL 'select' query.
To specify the column:
- In the Column to retrieve, enter the name of the column.
- Click the Add button and the property will appear below the Column to retrieve box.
- Specify a workflow variable to store the values of the column to be retrieved.
Note: If a variable that is not a collection is selected, only the first result will be stored.
Execute SQL