DB2 - Problem description
Problem IC63432 | Status: Closed |
UNEXPECTED BEHAVIOR WHEN MULTIPLE ARRAY_AGG FUNCTIONS ARE USED IN A SINGLE STATEMENT. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
Unexpected behavior can occur when multiple ARRAY_AGG functions are used in a single statement, and one or more of the ARRAY_AGG functions requires an implicit cast. The statement may fail with an SQL0901N error or a casting error (for example, SQL0420N). It is also possible that the statement succeeds, but the data in one or more of the resulting arrays is not correct. The ARRAY_AGG function takes as input a table column and returns an array built from the data in that column. The ARRAY_AGG function is only supported as a source expression in a SELECT INTO statement. An ARRAY_AGG function requires an implicit cast if the input table column data type is not identical to the target array element data type. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All DB2 UDB systems on Linux, Unix, and Windows platforms at * * service levels on Version 9.7.0. * **************************************************************** * PROBLEM DESCRIPTION: * * Unexpected behavior can occur when multiple ARRAY_AGG * * functions are used in a single statement, and one or more of * * the ARRAY_AGG functions requires an implicit cast. The * * statement may fail with an SQL0901N error or a casting error * * (for example, SQL0420N). It is also possible that the * * statement succeeds, but the data in one or more of the * * resulting arrays is not correct. * * * * The ARRAY_AGG function takes as input a table column and * * returns an array built from the data in that column. The * * ARRAY_AGG function is only supported as a source expression * * in a SELECT INTO statement. An ARRAY_AGG function requires * * an implicit cast if the input table column data type is not * * identical to the target array element data type. * **************************************************************** * RECOMMENDATION: * * Upgrade to product version 9.7 fix pack 1. * **************************************************************** | |
Local Fix: | |
Modify the failing statement by placing explicit casts from table column data type to array element data type, or, split the failing statement into multiple statements, each containing a single invocation of the ARRAY_AGG function. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows | |
Solution | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 28.09.2009 21.12.2009 21.12.2009 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP1 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.1 |