DB2 - Problem description
Problem IT34758 | Status: Closed |
SELECT DISTINCT QUERY FAILS WITH SQL0421 WHEN USED WITH SCROLLABLE CURSOR | |
product: | |
DB2 FOR LUW / DB2FORLUW / B50 - DB2 | |
Problem description: | |
A "SELECT DISTINCT" query may fail to compile with SQLCODE -421 if it is prepared for use with a scrollable cursor and at least one column referenced in the select-list has a column mask defined. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 version 11.5.5.1 * **************************************************************** | |
Local Fix: | |
: If possible, use a non-scrollable cursor. Alternatively, add an additional "SELECT *" to the original query. E.g., if the original query was: SELECT DISTINCT C1, C2 from T Change to: SELECT * FROM (SELECT DISTINCT C1, C2 from T) | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 version 11.5.5.1 * **************************************************************** | |
Comment | |
First fixed in Db2 version 11.5.5.1 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 03.11.2020 01.04.2021 01.04.2021 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |