- Contents
Latitude Console Help
Create a SQL Statement
Use the SQL Author window to create a custom SQL statement based on specified criteria.
To create a SQL statement
-
In the Main Menu window, from the Tools menu, click SQL Author. The SQL Author window appears.
-
To exclude duplicate records from the query results, select Exclude Duplicate Records.
-
To limit the query results to a specific number of records, select Maximum Records and then, in the box, type the maximum number of records to include in the results.
-
In the Select Columns pane, do the following as necessary:
-
In the Conditions pane, do the following as necessary:
-
In the Order pane, do the steps to Specify the Sort Order for Query Results.
Note: As you create the query, the SQL statement appears in the SQL statement panel.
-
To count the number of records that match the selection criteria, in the toolbar, click Count. The results appear in the Query Designer dialog box. Click OK.
-
To save the query, do the following:
-
In the toolbar, click Save. The Save Query Dialog box appears.
-
In the Query Name box, type a name for the query and then click Save.
Tip: To overwrite an existing query, in the Name column, click the query to overwrite and then click Save.
You can run the saved query using another query tool or copy and paste the SQL statement into another program.
-
To copy the SQL statement so you can paste it into another program, do the following:
-
In the SQL statement panel, use your mouse to select all the content in the pane.
-
Right-click on the selected content and click Copy. The statement copies to the Clipboard. You can now paste it into another program.
Related Topics