Execute SQL Query
Perform an SQL query against a specified database and place the results into a variable. The query may be either predefined in Nintex Admin Tool or defined within the Advanced Command itself.
Supported Oracle version is v11 and later using OLEDBC v11 driver only.
Predefined queries are executed from the server and with the user configured in the “connection string” in Nintex Admin Tool, while custom queries in wizards are executed from the robot.
Predefined query
-
Select the query you would like to perform from the available predefined queries.
In predefined query, the builder and query were already configured in Nintex Admin Tool. See Managing SQL.
-
Query Content and Parameters will be populated based upon the query you have selected.
-
Specify Value and Type for defined parameters as required.
-
Enter the name of the variable into which you'd like to place the results.
-
Indicate whether you would like to return all rows of the result or the first row only; and
Enter the delimiters to use to separate each row and column in the returned data.
-
The DB provider is predefined in Nintex Admin Tool SQL configuration and can be changed only through Nintex Admin Tool.
-
When using a "like" operation in a predefined query, include a
%
at the end of the value.For example: SELECT * FROM [20.9].dbo.[LeoServers] WHERE ServerName LIKE '20.9%'
-
When using a variable in a query, it should be specified without the use of single quotes (' ') around the variable.
For example: SELECT * FROM [20.9].dbo.[LeoServers] WHERE ServerName LIKE $test$
Custom query
-
Define the connection string for the data source
-
(Optional) Click the Builder link to assist in defining the connection string.
-
-
Indicate whether you would like to retrieve database login credentials from the Nintex Credentials Vault.
-
Enter your query using standard SQL syntax.
-
Select the relevant database provider (Default, Oracle, or SQL).
Default: Let Nintex identify the provider.
If you are using Oracle or SQL, we recommend you select the relevant database provider.
Supported Oracle version is v11 and later using OLEDBC v11 driver only.
-
Enter the name of the variable into which you'd like to place the results.
-
Indicate whether you would like to return all rows of the result or the first row only; and
-
Expand the Error handling option to provide instructions to the wizard on how to manage encountered errors. For more information on error handling, see Error handling.
Enter the delimiters to use to separate each row and column in the returned data.