Run your Query in QueryPad
When you have entered or pasted your SQL Query into the SQL Query Entry Pane in QueryPad, you can run it:
- From the Query menu select Execute Query.
or
- Select the Execute Query button on the QueryPad toolbar.
or
- Press the CTRL + Enter keys at the simultaneously.
QueryPad attempts to execute the query.
If your SQL query does not require any parameters, QueryPad will execute the query. However, if your query requires user-defined parameters, a Parameters dialog box is displayed, prompting you to enter the parameter or parameters:
There is a row for each required parameter, with the first parameter in the query being shown as the uppermost row and numbered 01.
Next to the parameter number is an indication of the type of parameter that QueryPad is expecting, for example, (STRING) means that the QueryPad is expecting a string value.
Example:
The following SQL Query includes two unknown parameters, the Parameter dialog is displayed when it is executed, similar to that shown above.
For each parameter:
- Use the combo box to choose the type of value for the parameter. This is the type of value that will be passed. If the chosen type cannot be converted to the type of value that QueryPad expects, a diagnostic message will be returned.
- Use the field next to the combo-box to define the value for the parameter.
When you have defined any required parameters, select the OK button to close the Parameters dialog box and run the SQL query.
When QueryPad executes the query, it will perform one of the following, depending on the RESULTSET status:
- Execute the query and provide diagnostic information only in the Information Pane
- Execute the query and display the query along with diagnostic information in the Information Pane.
For further information on the RESULTSET command, see Define whether QueryPad Displays the Results of your SQL Query.
When QueryPad executes your query, it provides diagnostic information about the query in the Information Pane. For more information on the diagnostics, see Understanding the QueryPad Diagnostics.
Further Information
Value Types: see Data Types in the ClearSCADA Guide to Expressions.