DB2 - Problem description
Problem IC90908 | Status: Closed |
DB21034E ERROR OCCURS WHEN BLOCK COMMENTS IS AT THE BEGINNING OF FILE AND 'WITH' SQL STATEMENT IS AFTER BLOCK COMMENT. | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem description: | |
When a block comment is inserted at the beginning of a 'with' SQL statement-through DB2 CLP, the SELECT SQL statement may fail even if it should be treated as a comment properly. This problem happens for CLP script and CLP command prompt. Following sql statement returns error DB21034E. $ cat with.sql /* comment */ with tmp (c1) as ( select 1 as c1 from sysibm.sysdummy1 union all select c1 + 1 from sysibm.sysdummy1, tmp where c1<2 ) select c1,'a',char(int(c1*rand())),'a' from tmp ; $ db2 -tvf with.sql /* comment */ with tmp (c1) as ( select 1 as c1 from sysibm.sysdummy1 union all select c1 + 1 from sysibm.sysdummy1, tmp where c1<2 ) select c1,'a',char(int(c1*rand())),'a' from tmp DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0084N An EXECUTE IMMEDIATE statement contains a SELECT or VALUES statement. SQLSTATE=42612 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.1 fixpack 3. * **************************************************************** | |
Local Fix: | |
Change the position of block comment not to start at the begining of the file. | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 Version 10.1 fixpack 3. | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC95350 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 17.03.2013 29.10.2013 29.10.2013 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.3 | |
10.1.0.3 |