Using QMF

Selecting the columns to display

Columns contain data of the same kind for each individual entry in the table. For example, the column called JOB contains data about the job title of each person in the Q.STAFF table. You want to see several columns from the table for this lesson.

Choice 2, Columns is already selected, because selecting columns is usually the next step in creating a query.

If you look in the echo area on the Specify panel, you can see the word ALL appears directly under the Columns heading. If you do not select specific columns, QMF automatically selects all the columns in the table.

To select columns:

  1. Press Enter.

    The Columns panel displays, which shows all the columns in the Q.STAFF table. You might need to scroll forward to see them all.

    At the bottom of the panel, you will see selections for Expression and Summary Functions. You will not use expressions or summary functions in this lesson, but you will learn more about them in Chapter 4, Viewing the Data in the Database Using Prompted Query.

  2. Type x beside NAME, DEPT, JOB, SALARY, and COMM.

    Figure 9. 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                                    |  |
    |                                 | x   NAME                                  |  |
    |                                 | x   DEPT                                  |  |
    |                                 | x   JOB                                   |  |
    |                                 |     YEARS                                 |  |
    |                                 | x   SALARY                                |  |
    |                                 | x   COMM                                  |  |
    |                                 |                                           |  |
    |                                 |   1. Expression (A+B, etc.)...            |  |
    |                                 |   2. Summary Functions (SUM, etc.)...     |  |
    |                                 +-------------------------------------------+  |
    |                                 | F1=Help  F5=Describe  F7=Backward         |  |
    |                                 | F8=Forward  F12=Cancel                    |  |
    |                                 +-------------------------------------------+  |
    +--------------------------------------------------------------------------------+
  3. Press Enter.

The columns you selected are displayed in the echo area, and the Specify panel displays again.


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