Pathmaker Programming Guide

Using Null Values
Defining Data for a NonStop SQL Pathmaker Application
067868 Tandem Computers Incorporated C–5
Suppose that the table contains the following data, inserted by NonStop SQL
outside of the Pathmaker environment. In this example, the question marks (?)
represent a null value:
MEMBERNUM MEMBERNAME SPOUSENAME
--------------------------------------------
| 1 | John | Paula |
--------------------------------------------
| 2 | Mary | ???????? |
--------------------------------------------
If John gets divorced and you use a DB requester application to update this table,
the SPOUSENAME column for John cannot contain a null value; instead,
SPOUSENAME will contain the value that was in the data entry field for
SPOUSENAME on the application screen at the time of the update.
If Mary changes the spelling of her name and you use a DB requester application
to update this table, the SPOUSENAME column will still contain a null value. The
SQL standard server only changes the null indicator of a column if the value of the
column changes.
If you insert a new, unmarried member, the SPOUSENAME column for the new
member will contain the value that was in the data entry field for SPOUSENAME
at the time of the update.
You cannot use an index on a column that accepts null values in a DB requester.
To read along a column that accepts null values, you must enable nonindex reads.
In a DB requester, you select a column to read along by putting the cursor in the
screen field on the application screen that corresponds to the column. When the
SQL standard server reads data along a column that accepts null data, rows that
have null data in that column will not appear on the screen; however, rows that
have null data in other columns can appear on the screen. Note that nonindex
reads are not as efficient as index reads.
The next few pages illustrate how read operations work. In the following
examples, the question marks (?) represent null data.
Suppose the table contains the following data:
MEMBERNUM MEMBERNAME SPOUSENAME
--------------------------------------------
| 1 | John | Paula |
--------------------------------------------
| 2 | Mary | ???????? |
--------------------------------------------
| 3 | Jim | Michelle |
--------------------------------------------
| 4 | Janis | Robert |
--------------------------------------------