A fix is available
APAR status
Closed as program error.
Error description
AN INCORRECT OUTPUT RETURNED FOR A QUERY CONTAINING SET FUNCTIONS, GROUP BY AND UNION
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: For all DB2 z/OS users who have queries * * containing UNION or UNION ALL and at least * * one union leg contains join and GROUP BY. * **************************************************************** * PROBLEM DESCRIPTION: An incorrect result can occur when a * * query has the following conditions * * true: * * 1. Contains UNION or UNION ALL; AND * * 2. At least one UNION leg contains * * join and GROUP BY; AND * * 3. The join column is one of the * * grouping columns. * **************************************************************** * RECOMMENDATION: * **************************************************************** An incorrect result can occur when a query has the following conditions true: 1. Contains UNION or UNION ALL; AND 2. At least one UNION leg contains join and GROUP BY; AND 3. The join column is one of the grouping columns. For example: SELECT T1.C1, SUM(T1.C3) FROM T1, T2 WHERE T1.C1 = T2.C1 GROUP BY T1.C1 UNION SELECT ... An incorrect result occurs because DB2 may choose an erroneous access path in the above situation. DB2 incorrectly processes set function evaluation with the erroneous access path. Additional Keywords: SQLINCORR INCORROUT SQLUNION SQLUNIONALL SQLJOIN SQLGROUPBY
Problem conclusion
With corrected DB2 logic, the erroneous access path, which can cause the incorrect result, is avoided.
Temporary fix
********* * HIPER * *********
Comments
APAR Information
APAR number
PK56283
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
810
Status
CLOSED PER
PE
NoPE
HIPER
YesHIPER
Special Attention
NoSpecatt
Submitted date
2007-11-08
Closed date
2007-12-12
Last modified date
2008-01-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK32175 UK32176
Modules/Macros
DSNXOPRP DSNXOPRS
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.1","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
02 January 2008