SQLSELECT

Submits an SQL (Structured Query Language) statement to a database server and returns a single result.

Supported Script Types

Generic Email Chat Phone Voicemail Work Item

Properties

SQLQuery
This property is the SQL statement that will be submitted to the database server. This statement should be expected to return records.
GlobalVariables
The property is not used.
Publish

This property publishes a variable and value.

This property publishes everything in the database associated with a contact.

If you want to publish specific data, use the ASSIGN action.

TimeoutSec
The number of seconds until the query times out. The default is 10. The maximum number of seconds supported is 30 (though larger numbers can actually be entered in the field).

Branches

Default
The Default branch condition will be used unless another branch condition is met.
OnNoRecords
When data is not returned from the database, this branch condition is triggered.
OnError

This branch condition is triggered when the SQL Query is invalid.

Error Handling is the best practice.

OnTimeout
When the number of timeout seconds is reached, this branch condition is triggered.

Tips and Tricks

  • Use a SQLCURSOR action when multiple row results are required.
  • A query typically returns one or more columns of data. When NICE inContact returns the data from the database server back to the script, each individual column is stored in a variable with the same name.
  • You will need to determine if you want a standard, encrypted, or VPN connection to your DB Provider. Unless otherwise specified in a SETDB action, NICE inContact will use the default NICE inContact database. This database is a generic dictionary of tables provided to all customers.