Release 10.1A: OpenEdge Data Management:
DataServer for ORACLE

> ## 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 (`?`). Table 2–7 summarizes how the OpenEdge Unknown value (`?`), the ORACLE unknown, and `NULL` values map to each other.

> Table 2–7: Unknown value (`?`) and NULL values
> Progress 4GL 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.
>     address2 = ?.

> The Progress 4GL 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 name <> "smith":
>       DISPLAY 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.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095