home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

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
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 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 FixList