DB2 - Problem description
Problem IT38549 | Status: Closed |
WRONG RESULT WHEN SUBSELECT WITH SCALAR AGGREGATE REFERENCED MULTIPLE TIMES | |
product: | |
DB2 FOR LUW / DB2FORLUW / B50 - DB2 | |
Problem description: | |
Db2 query may generate wrong result when the following conditions are met: -There is scalar aggregate in a subselect -There are multiple COUNT distinct that references various columns from the subselect or the subselect is referenced in multiple places | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * **************************************************************** | |
Local Fix: | |
Rewrite query so SQL has another subquery level with ORDER BY and use 'DB2COMPOPT' VALUE='NO_OBELIM'. | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * **************************************************************** | |
Comment | |
Upgrade to 11.5 FP7 or later | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 29.09.2021 22.11.2021 09.12.2021 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |