SQL Editor

Use the SQL Editor on the Configuration tab to create a query on one or more database tables.

If you are familiar with SQL, you can create a query by directly entering an SQL statement in the editor window.

Alternatively, you can click the New button to build a new query using the Visual Query Builder.

The Query Builder cannot be used to modify an existing query, and should only be used when you want to create a new query. If an existing query is displayed in the editor window, it will be overwritten (unless you click Cancel in the Query Builder dialog). As a precaution, you can save an existing query using the Save to file option (See below).

Load from file

Click the Load button to load a query which has been previously saved to a query (*.sql ) file.

Save to file

Click the Save button to save the contents of the editor window to a query (*.sql) file.

Execute script

Click the Execute button to run the query to test for errors and to verify the results returned by the query. If no results are returned, or the results are not what you expect, or you receive an error, check the syntax of your query.

If the list of values is empty, or you receive an error, check the syntax of your query.

Insert table and column names

Use the Insert | Table name and Insert | Column name right-click menu options, or click the Insert buttons on the toolbar, to insert a table or column name into the query.

Insert substitution parameters 

To prompt the user for values when running queries, substitution parameters (for example HOLE_ID = '?Enter the Hole ID?') can be inserted into queries.

Use the Insert | Substitution parameter right-click menu option, or click the Insert Substitution Parameter button on the toolbar, to select the substitution parameter you want to insert.

Change to upper or lower case

Use the Format | Change to upper case and Format | Change to lower case right-click menu options, or click the Format buttons on the toolbar, to change the case of selected text.

Indentation

Use the Format | Increase indent and Format | Decrease indent right-click menu options, or click the Indent buttons on the toolbar, to modify the indentation of the current line.

Column Properties

(Select Query only) Click the Properties button to button to edit the properties of the columns that will be retrieved by the query.