Displaying rows that contain a certain value
To display only those rows of a table that have a certain value in a column, put the value under the column in the example table.
That value is then a condition. The query selects just those rows of the table that contain that value in the indicated column.
You can, for example, display all the column names that are shown in the example table, and select only the rows with 5 in the YEARS column, as shown below:
Q.STAFF| DEPT | NAME | JOB | YEARS |
-------+------+------+-------+---------|
P. | | | | 5 |
QMF produces
this report:
DEPT NAME JOB YEARS
---- ---------- ----- ------
38 MARENGHI MGR 5
15 NGAN CLERK 5
10 DANIELS MGR 5
84 DAVIS SALES 5
84 GAFNEY CLERK 5
You can display only the columns DEPT, NAME, and JOB and select only the rows with 20 in the DEPT column. (You could get the report without the DEPT column by not including the P. in that column of the example table.) For example, when you run this query:
Q.STAFF | ID | DEPT | NAME | JOB | YEARS | SALARY | COMM |
--------+----+---------+------+-----+-------+--------+------|
| | P. 20 | P. | P. | | | |
QMF produces this report:
DEPT NAME JOB
---- ---------- -----
20 SANDERS MGR
20 PERNAL SALES
20 JAMES CLERK
20 SNEIDER CLERK
You cannot enter any values for columns that contain binary or XML data.