Unknown Value (?)
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Unknown Value (?)
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.
| ABL value | Oracle equivalent |
|---|---|
Unknown value (?)
|
NULL
|
"" (zero-length string) |
|
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:
|
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.
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:
|
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.