Using Insert Query Element

You can use the Insert Query Element tool to add field names, table names, and SQL commands to queries.

  1. On an SQL report query page, select the query box location where you want to insert a name or command.
  2. Select Report > Insert Query Element.
    Or use CTRL+I.
  3. To insert a field name:
    1. Select the Fields tab.
    2. In the Table dropdown list, select the table with the fields to add to the query.
      Field query with table selected
    3. Optional: Select Sort to organize the fields in alphabetical order.
    4. Select the gray box to the left of the field name to select it.
      Use Ctrl-Click to select multiple fields.
      Table list with a gray box option circles in red.
    5. Select Insert.
      The field names are inserted at the cursor location in the query box.
  4. To insert a table name:
    1. Select the Tables tab.
    2. Optional: To include .HST tables in the list, select Audit Objects.
      Tables with Audit Objects Selected
    3. Optional: Select Find to open the Find dialog and search for the table to insert.
    4. Select the gray box to the left of the table name.
      Use Ctrl-Click to select multiple tables.
    5. Select Insert.
      The table name is inserted at the cursor location in the query box.
  5. To insert an SQL command:
    1. Select the SQL tab.
      SQL
    2. Select the SQL command to insert.
    3. Select Insert.
      The SQL command is inserted at the cursor location in the query box.