DB2 - Problem description
Problem IT22197 | Status: Closed |
SQL0901N "COLUMN NUMBER OUT OF RANGE" ERROR WHEN GROUP BY IN NULL PRODUCING SIDE OF OUTER JOIN | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
DB2 query may produce SQL0901N -"column number out of range" error, when the following conditions are met: 1) The query has Outer Join 2) Null producing side of Outer Join has Group By 3) There is IN predicate on column from Tuple preserving side. Example: drop table t1; create table t1(c1 int not null primary key); insert into t1 values(1),(2),(3); drop table t2; create table t2(c1 int not null, c2 int not null); select * from t1 left outer join (select sum(c2), c2 from t2 group by c2)t on t1.c1=t.c2 and t1.c1 in (1,2); | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 10.5 Fix Pack 10 or higher * **************************************************************** | |
Local Fix: | |
1) Rewrite the query to convert the IN predicate into OR or NOT IN predicate into AND 2) Use db2set DB2COMPOPT=NO_GBPU (instance recycle is needed) or use optguideline: /* */ | |
Solution | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : follow-up : IT22207 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 29.08.2017 19.07.2018 19.07.2018 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |