To select tables and columns:
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:
You can specify search criteria to filter the list so it is smaller. For example, you can type Q.S% on the first line of the Tables dialog panel, and then press the List function key. QMF lists all the tables with names that start with Q.S. % represents a string of any length, containing any characters. The Table List panel displays.
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.
The Columns panel displays.
+--------------------------------------------------------------------------------+ | 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 | | | +-------------------------------------------+ | | | +--------------------------------------------------------------------------------+
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.
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 | | | +------------------------+ | | | +--------------------------------------------------------------------------------+