Using Content Assist for visual queries

If you are using QMF for Workstation, Content Assist helps to complete SQL statements by providing lists of options while the statement is being typed.

About this task

To use Content Assist while typing a SQL statement:

Procedure

  1. Select File > New > Other and expand the QMF Objects folder. Select Visual Query from the list of QMF Objects.
  2. Specify the name of the query in the Name field and where the query will be saved in the Data Source field. Click Finish.
  3. Click the SQL tab.
  4. At any time while typing the SQL statement, press Ctrl+Spacebar. A drop-down list opens underneath the cursor.
    The contents of the drop-down list depend on the location of the cursor in the SQL statement and the contents of the table being called. For example, if SELECT * FROM Q. is displayed when Content Assist is selected, the drop-down list will display all tables in the data source with the owner name Q. If SELECT * FROM Q.STAFF WHERE is displayed, the drop-down list will display all columns of the Q.STAFF table.
  5. If you select Content Assist while partially typing the name of a column, a function, or a table reference, and the partially typed keyword is not ambiguous, Content Assist will automatically complete the keyword.
    For example, if you use Content Assist while typing SEL, the keyword SELECT will be completed automatically.
  6. Select an option from the drop-down list. The selected text is automatically inserted into the SQL statement.