Using QMF


Selecting tables and columns

To select tables and columns:

  1. Enter the name of your table on the Tables panel. You can specify up to 15 tables.

    The name of the table shows in the echo area, and the Specify panel displays.

    To find the name of a table, you can list available tables:

    Figure 24. The Table List panel

    +--------------------------------------------------------------------------------+
    | PROMPTED QUERY                                                 LINE    1       |
    |                                       +-------------------------------------+  |
    |   Tables:                             |               Tables                |  |
    |   > ...                   +-----------------------------------------------+ |  |
    |                           |                  Table List                   | |  |
    |   *** END ***             |                                               | |  |
    |                           |   Name               Owner                    | |  |
    |                           |                                   1 to 5 of 5 | |  |
    |                           |   SALES              Q                        | |  |
    |                           |   SALG               Q                        | |  |
    |                           |   SAMTALE            Q                        | |  |
    |                           |   STAFF              Q                        | |  |
    |                           |   SUPPLIER           Q                        | +  |
    |                           +-----------------------------------------------+ |  |
    |                           | F1=Help  F5=Describe  F7=Backward  F8=Forward | |  |
    |                           | F10=Comments  F11=Sort  F12=Cancel            | +  |
    |                           +-----------------------------------------------+    |
    |                                                                                |
    |                                                                                |
    | OK, LIST command executed successfully.                                        |
    +--------------------------------------------------------------------------------+

    You can press the Comments function key to see a descriptive comment for each object in the list. Press the Describe function key to see more detailed information about an object. Press the Sort function key to sort by name, type, or date. Press the Cancel function key to remove the list.

    If you have selected only one table, choice 2, Columns, is already selected for you on the Specify panel. That is because selecting columns is usually the next step in creating a query. If you remove the 2, Prompted Query selects all columns. If you look in the echo area, you can see that the word ALL appears directly under the Columns heading.

  2. Press Enter.

    The Columns panel displays.

    Figure 25. The Columns panel

    +--------------------------------------------------------------------------------+
    | PROMPTED QUERY                                       MODIFIED  LINE    1       |
    |                                 +-------------------------------------------+  |
    |   Tables:                       |                  Columns                  |  |
    |     Q.STAFF                     |                                           |  |
    |                                 | Select one or more columns.  You can also |  |
    |   Columns:                      | select either an expression or function.  |  |
    |   > ...                         |                               1 to 8 of 8 |  |
    |                                 |   Q.STAFF -- all                          |  |
    |   *** END ***                   |     ID                                    |  |
    |                                 |     NAME                                  |  |
    |                                 |     DEPT                                  |  |
    |                                 |     JOB                                   |  |
    |                                 |     "YEARS"                               |  |
    |                                 |     SALARY                                |  |
    |                                 |     COMM                                  |  |
    |                                 |                                           |  |
    |                                 |   1. Expression (A+B, etc.)...            |  |
    |                                 |   2. Summary Functions (SUM, etc.)...     |  |
    |                                 +-------------------------------------------+  |
    |                                 | F1=Help  F5=Describe  F7=Backward         |  |
    |                                 | F8=Forward  F12=Cancel                    |  |
    |                                 +-------------------------------------------+  |
    |                                                                                |
    +--------------------------------------------------------------------------------+
  3. Choose the columns you want displayed in your report by typing any character in the space in front of the column name.

    Use the Tab key to move past columns you do not want to select. Press the Forward or Backward function keys to display additional columns.

    If you want to see information about the columns before you select them, tab to the column name and press the Describe function key. The Column Description panel displays.

  4. Press Enter. The columns you select are shown in the echo area, and the Specify dialog panel displays, with choice 3, Row Conditions, selected.

Figure 26. QMF lists the columns you selected.

+--------------------------------------------------------------------------------+
| PROMPTED QUERY                                       MODIFIED  LINE    1       |
|                                                    +------------------------+  |
|   Tables:                                          |        Specify         |  |
|     Q.STAFF                                        |                        |  |
|                                                    | Select an item.        |  |
|   Columns:                                         |                        |  |
|     NAME                                           | 3 1. Tables...         |  |
|     DEPT                                           |   2. Columns...        |  |
|     JOB                                            |   3. Row Conditions... |  |
|     SALARY                                         |   4. Sort...           |  |
|     COMM                                           |   5. Duplicate Rows... |  |
|                                                    +------------------------+  |
|   *** END ***                                      | F1=Help  F12=Cancel    |  |
|                                                    +------------------------+  |
|                                                                                |
+--------------------------------------------------------------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]