DB2 - Problem description
Problem IC73847 | Status: Closed |
SQL1224N or SQL421N returned for inline SQL function with scalar aggregate function as parameter | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
When the SELECT list of a result table of a SET operator (e.g. UNION ALL, INTERSECT, etc.) references an inline SQL function with a scalar aggregate function as input argument, DB2 may return SQL0421N or terminate abnormally (SQL1224N). When SQL1224N is returned, the trap file will contain the following stack: Signal #11 sqlnq_sem sqlnp_smactn sqlnp_parser sqlnp_main sqlnn_cmpl sqlnn_cmpl sqlra_compile_var sqlra_find_var sqlra_get_var sqlri_ddl_get_section sqlri_ddl_common .... .... Examples: CREATE FUNCTION lws.GETDOCID(docid VARCHAR(254)) RETURNS VARCHAR(319) LANGUAGE SQL NO EXTERNAL ACTION DETERMINISTIC RETURN CONCAT(CONCAT('{DOCID$',docid), '}') ; -- Example 1: SQL0421N SELECT 'foo' as key FROM sysibm.sysdummy1 UNION ALL SELECT lws.GETDOCID(CHAR(ROW_NUMBER() OVER())) AS key FROM sysibm.sysdummy1; -- Example 2: SQL1224N SELECT lws.GETDOCID(CHAR(ROW_NUMBER() OVER())) AS key FROM sysibm.sysdummy1 UNION ALL SELECT 'foo' as key FROM sysibm.sysdummy1 ; | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See ERROR DESCRIPTION. * **************************************************************** * RECOMMENDATION: * * Apply v9.5 Fixpack 8 to the server. * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows | |
Solution | |
First fixed in v9.5 Fixpack 8. At minimum this fix should be applied to the server side. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 12.01.2011 27.06.2011 27.06.2011 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP8 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.5.0.8 |