Help for typing SQL statements

This topic contains information about the legacy SQL Utility, which is being phased out from GainSeeker Suite. It is still available for use in version 8.3, but is being replaced by the new GainSeeker SQL Utility function in the GainSeeker Utility module.

Typing statements

In Execute SQL mode, you may click in the box at the top of the screen and type the full SQL statement.

For help with SQL commands and reserved words, table names and column names:

  1. Click to place your cursor in the position where items should be pasted into the statement.  

  2. Right-click in the SQL statement box and select an option from the right-click menu.  See below for more information.

    Each option presents a list of items that can be pasted to the location of your cursor in the SQL statement box.

  3. Select one or more items from the list, and then click OK.  

Reserved Words

Reserved Words perform specific tasks in SQL.

Clicking this option displays a list of SQL Reserved Words.

To paste one or more Reserved Words into your SQL statement, select one or more items on this list and then click OK.  

Tip:  The first three items in the list – SELECT, FROM and WHERE – are the most commonly used for creating an SQL statement to return a specific query result set.

Table Names

The data source used to log in to the SQL Utility referenced a database or other set of tables.  To quickly access the names of these tables, click Table Names on the right-click menu.

This displays a list of table names available to the data source.

To paste one or more Table names into your SQL statement, select one or more items in the list and then click OK or Open.  

Column Names

For any table available to the data source, you can quickly access the names of all columns in that table.  Click Column Names on the right-click menu.

This displays a screen that allows you to choose column names for any of the tables available to the selected connection.

  1. Click the Table list and select the name of the table for which to find column names.

    Tip:
     If the SQL statement already contains only one table name, it will automatically be selected in the Table list.

  2. Select one or more items from the Column or Field list, and then click OK.  The column names you selected are pasted into the SQL statement.

  3. To access column names from another table, repeat these steps.