DB2 - Problem description
Problem IC62506 | Status: Closed |
DB2 MAY ISSUE SQL0344N COMPILING A QUERY REFERENCING A VIEW WITH COALESCE OR VALUE IN ITS OUTPUT LIST | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
DB2 may issue sqlcode SQL0344N compiling a query that references a view which was created with the COALESCE or VALUE function in its output list. The sqlcode will be issued only if all the following conditions are satisfied: - The view was created on DB2 Version 9.5 GA, Fix Pack 1 or Fix Pack 2 - The output of the first parameter of the COALESCE or VALUE function is not nullable - The output of the first parameter of the COALESCE or VALUE function flows a default value An example scenario: In Fix Pack 2: CREATE TABLE T (C INT NOT NULL WITH DEFAULT 2); CREATE VIEW V (VAL_C) AS SELECT VALUE(C, 1) FROM T; SELECT VAL_C FROM V; -- <-- works fine In Fix Pack 3: SELECT VAL_C FROM V; -- <-- SQL0344N issued SQL0344N The recursive common table expression "<schema>.V" has mismatched data types, lengths or code pages for column "VAL_C". SQLSTATE=42825 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * EE or EEE * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 1. * **************************************************************** | |
Local Fix: | |
Manually recreate the affected view(s). | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 Version 9.7 Fix Pack 1. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 12.08.2009 19.02.2010 19.02.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP1 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.1 |