The DataServer supports the Unknown value (?), which is represented by a question mark (?) in OpenEdge. In Oracle the Unknown value (?) is stored as a NULL value. This section describes how the DataServer handles the Unknown value (?).
The following table summarizes how the OpenEdge Unknown value (?), the Oracle unknown, and NULL values map to each other.
Table 15. Unknown value (?) and NULL values
ABL value
Oracle equivalent
Unknown value (?)
NULL
"" (Zero-length string)
" " (One space)
You can assign the Unknown value (?) to a field in an Oracle database by using the question mark (?) operator, which represents the Unknown value (?). For example, the following procedure assigns the OpenEdge Unknown value (?) to the address2 field of the customer table:
FIND FIRST customer.
customer.address2 = ?.
The Unknown value (?) sorts high in Oracle DataServer applications, as it does in OpenEdge applications. For an ascending index, the Unknown value (?), or values (?), always appear at the end of a sort, for a descending index, they appear at the beginning.
Note: Columns that have the NOT NULL attribute cannot contain the Unknown value (?).
Another difference in behavior between the Unknown value (?) and NULL is that Oracle does not return rows that contain NULL unless an operation involving NULL is specified. The following query will not return rows with NULL for an Oracle database. However, when you run it against an OpenEdge database, the query returns all the customers whose names are not Smith, including those whose names are unknown. For example:
FOR EACH customer WHERE customer.name <> "smith":
DISPLAY customer.name.
END.
Although the example statement will not generate an illegal operator message, it will not necessarily generate the same results with an Oracle database that it will with an OpenEdge database.