DB2 Version 9.7 for Linux, UNIX, and Windows

Character and graphic constant handling

An alternate way to parse character or graphic constants is introduced to support applications that expect these constants to be assigned the data types CHAR and GRAPHIC, respectively.

Enablement

This support is enabled by setting bit position number 9 (0x100) of the DB2_COMPATIBILITY_VECTOR registry variable. The recommended setting for DB2_COMPATIBILITY_VECTOR is ORA, which sets all of the compatibility bits.

After this support is enabled, character or graphic string constants whose length is less than or equal to 254 bytes have a data type of CHAR or GRAPHIC, respectively. Character or graphic string constants whose length is greater than 254 bytes have a data type of VARCHAR or VARGRAPHIC, respectively. Because this data type assignment can change the result types of some SQL statements, it is strongly recommended that this registry variable setting for a database not be toggled.