DB2 - Problem description
Problem IT01101 | Status: Closed |
CHAR(' ',0) RETURNS EMPTY STRING INSTEAD OF NULL IN VARCHAR2 ENABLED DATABASE. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
In a VARCHAR2 enabled database, an assignment of an empty string value to a CHAR, VARCHAR, GRAPHIC or VARGRAPHIC should produce a NULL value. However, if a string literal is not empty, consists of all blanks is passed as an argument to the scalar functions CHAR, VARCHAR, GRAPHIC or VARGRAPHIC, and has a specified length of 0, then an empty string is returned instead of the expected NULL. The returned string might look like the following sample: values char(' ',0) 1 - 1 record(s) selected. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 9.7 fix pack 10 * **************************************************************** | |
Local Fix: | |
Change the string literal to an empty string. For example, changing the string literal to CHAR('',0) will fix this issue. | |
Solution | |
First fixed in DB2 version 9.7 fix pack 10 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 16.04.2014 12.11.2014 07.04.2015 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP10 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.10 |