DB2 - Problem description
Problem IC88910 | Status: Closed |
SQL FUNCTION IS NOT SUPPORTED IN THE ON CLAUSE OF THE MERGE STATEMENT AND DB2 DOES NOT RETURN A PROPER MESSAGE. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
SQL function is not supported in the ON clause of the MERGE statement and DB2 does not return a proper message. Example: CREATE TABLE T1 (C1 TIMESTAMP NOT NULL , C2 INTEGER NOT NULL , C3 CHAR(1)) DB20000I The SQL command completed successfully. CREATE TABLE T2( C1 INTEGER NOT NULL) DB20000I The SQL command completed successfully. CREATE FUNCTION FUNC1(D1 VARCHAR(8)) RETURNS TIMESTAMP LANGUAGE SQL RETURN TIMESTAMP(SUBSTR(D1,1,4)) DB20000I The SQL command completed successfully. MERGE INTO T1 P USING (SELECT C1 FROM T2 ) S ON P.C1 = FUNC1('20120808') WHEN MATCHED THEN UPDATE SET C3='P' DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0901N The SQL statement failed because of a non-severe system error. Subsequent SQL statements can be processed. (Reason "Unknown function protocol".) SQLSTATE=58004 db2diag.log 2012-11-04-00.48.00.881440-240 I10468011E860 LEVEL: Severe PID : 2827 TID : 46919879485760PROC : db2sysc 1 INSTANCE: DB2INST1 NODE : 001 DB : SAMPLE APPHDL : 1-10315 APPID: 10.190.99.215.2684.121104043037 AUTHID : ***** EDUID : 1901 EDUNAME: db2agent (SAMPLE) 1 FUNCTION: DB2 UDB, relation data serv, sqlrr_dump_ffdc, probe:300 DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes sqlcaid : SQLCA sqlcabc: 136 sqlcode: -901 sqlerrml: 25 sqlerrmc: Unknown function protocol sqlerrp : SQLNG032 sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000 (4) 0x0045C5E3 (5) 0xFFFFF807 (6) 0x00000001 sqlwarn : (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) sqlstate: Stack Trace: ossDumpStackTraceEx OSSTrapFile::dumpEx sqlo_trce sqloDumpDiagInfoHandler __restore_rt pthread_kill sqloDumpEDU sqldDumpContext sqlrr_dump_ffdc sqlzeDumpFFDC sqlzeSqlCode sqlnn_erds sqlng_process_parse_tree_node sqlng_process_BF_node sqlng_walk_BF_chain sqlng_build_thread sqlng_build_TA_op sqlng_process_scan_op sqlng_process_sort_op sqlng_build_thread sqlng_scan_derived_table | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 8 * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 Version 9.7 Fix pack 8 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 06.12.2012 15.04.2013 15.04.2013 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP8 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.8 |