If you create a table that is partially filled with data, QMF places the code word NULL, which means "value unknown", in the locations that contain no data. Do not confuse NULL with any of these values:
Each of the above is a value that you can enter in some row and column of a table. NULL occurs when no value is entered, or where the value is specifically set to NULL. It prints and displays as a single hyphen (-).
To select rows that have no entry in a column, put NULL in that column. For example, you can display the IDs and names of employees in Department 38 for whom YEARS is null.
When you run this query:
Q.STAFF | ID | NAME | DEPT | JOB | YEARS | SALARY | COMM | --------+----+------+------+-----+-------+--------+------| | P. | P. | 38 | | NULL | | | |
QMF produces this report:
ID NAME ------- --------- 60 QUIGLEY 120 NAUGHTON
You can not use NULL with an example element in an example table. Use a CONDITIONS box instead. For example:
This query is INCORRECT:
Q.STAFF | NAME | COMM | SALARY | | --------+------+------------+--------+----------| P. | | _C ¬=NULL | _S | _C + _S | |
This query is CORRECT:
Q.STAFF | NAME | COMM | SALARY | | --------+------+------------+--------+----------| P. | | _C | _S | _C + _S | | CONDITIONS | |------------------------| | _C ¬=NULL | |