Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Initial Programming Considerations : Data types : Zero-length character strings : _BLANKDEFAULT
 
_BLANKDEFAULT
When records with a NULL string in equality matches but not records with the NULL value are queried on a server, MS SQL Server distinguishes between a NULL value and a NULL string unlike Oracle which excludes records with both a NULL or a NULL string in equality matches and treats both as NULL.
To maintain the distinction between NULL and NULL string in Oracle, a NULL string ("") migrated from OpenEdge to Oracle is converted to a single-spaced string (" "). This enables Oracle to achieve equality matches on null strings separate from NULL values.
If you are migrating from the Oracle DataServer to the MS SQL Server DataServer and have developed queries against Oracle that depend on the default value for migrated fields being a single-space string (" ") rather than as a null-string (""), a special, hidden environment variable "_BLANKDEFAULT" is made available to allow an OpenEdge Initial Value of the null-string ("") to be converted to a single-space blank string (" ") so that the initial values are consistent with the expectations for server data in Oracle.
Note: The "_BLANKDEFAULT" environment variable does not affect the conversion of the OpenEdge Unknown value (?) to NULL on the server.