In Prompted Query, you can request that rows with duplicate information not appear in your report. For example, if you create a query to show all departments that have salespeople based on the sample tables, the report will show duplicate rows for each department with more than one salesperson.
DEPT DIVISION ------ ---------- 15 EASTERN 20 EASTERN 38 EASTERN 38 EASTERN 42 MIDWEST 51 MIDWEST 51 MIDWEST 66 WESTERN 66 WESTERN 66 WESTERN 84 WESTERN 84 WESTERN
PROMPTED QUERY MODIFIED LINE 1 +---------------------------------------+ Tables: | Duplicate Rows | Q.STAFF(A) | | Q.ORG(B) | Select one of the following. | | | Join Tables: | Keep. . 2 1. Duplicate rows. | A.DEPT And B.DEPTNUMB | 2. Single copy of each row. | +---------------------------------------+ Columns: | F1=Help F12=Cancel | DEPT +---------------------------------------+ DIVISION Row Conditions: If JOB Is Equal To 'SALES' Duplicate Rows: > ... *** END ***
When you run the query, QMF displays a report that shows one row for each department, as shown in Figure 45.
DEPT DIVISION ------ ---------- 15 EASTERN 20 EASTERN 38 EASTERN 42 MIDWEST 51 MIDWEST 66 WESTERN 84 WESTERN