DB2 - Problem description
Problem IT28831 | Status: Closed |
UPDATE STATEMENT WITH CORRELATED SCALAR SUBQUERY FAILS WITH SQLCODE -407 | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - DB2 | |
Problem description: | |
Starting with Db2 v11.1.4.4, an UPDATE statement that includes a correlated scalar subquery may incorrectly return SQLCODE -407, SQLSTATE 23502 at run time if the scalar subquery returns a NULL result. This may happen even if the assignment of the NULL value is protected with - for example - COALESCE: update T set NotNullableColumn = coalesce((select tabname from syscat.tables where tabname = T.COL1), T.COL2) | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 11.1 Mod 4 Fixpack 5 or higher * **************************************************************** | |
Local Fix: | |
db2set DB2COMPOPT=NO_UPDATE_COMP | |
Solution | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 17.04.2019 16.01.2020 16.01.2020 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |