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 IT19202 Status: Closed

DB2 MAY ISSUE SQL0119N WHEN REFERENCING A CORRELATED COLUMN INSIDE A SCALAR
AGGREGATE FUNCTION

product:
DB2 FOR LUW / DB2FORLUW / B10 - DB2
Problem description:
DB2 may incorrectly issue a SQL0119N when a scalar 
aggregate function references a correlated column. This can 
happen when there are at least two scalar aggregate functions 
with correlated column references. 
 
 
Example: 
 
SELECT 
    SUM(case when 99 = (SELECT T1.C2 FROM T1 where T1.C1 = 
T2.C1) then 0 else 1 end), 
    SUM(case when 99 = (SELECT T1.C2 FROM T1 where T1.C1 = 
T3.C1) then 0 else 1 end) 
FROM T2, T3
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 11.1 Mod 2 Fix Pack 2 or higher               * 
****************************************************************
Local Fix:
If there is no explicit group by clause, add table references to 
the correlated columns to eliminate correlation within the 
scalar aggregate and also add a DISTINCT to the scalar subquery: 
 
SELECT 
    SUM(case when 99 = (SELECT DISTINCT T1.C2 FROM T1, T2 where 
T1.C1 = T2.C1) then 0 else 1 end), 
    SUM(case when 99 = (SELECT DISTINCT T1.C2 FROM T1, T3 where 
T1.C1 = T3.C1) then 0 else 1 end) 
FROM T2, T3
available fix packs:
DB2 Version 11.1 Mod 2 Fix Pack 2 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod2 Fix Pack2 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod2 Fix Pack2 iFix002 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix002 for Linux, UNIX, and Windows

Solution
First fixed in DB2 11.1 Mod 2 Fix Pack 2
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
09.02.2017
28.06.2017
28.06.2017
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)