home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC71043 Status: Closed

UNTYPED NULL IN A PL/SQL PROCEDURE CURSOR DEFINITION RESULTS IN SQLCODE
-604, SQLSTATE 42611

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
An untyped NULL in the select-list of a PL/SQL procedure cursor 
definition may result in SQLCODE -604, SQLSTATE 42611, for 
example: 
 
CREATE OR REPLACE PROCEDURE PROC1  ( )  IS 
 v_char VARCHAR2(30); 
 v_char2 VARCHAR2(30); 
CURSOR cur_test is 
SELECT DUMMY, 
NULL  as add_on_column 
FROM   DUAL; 
... 
 
SQL0604N  The length, precision, or scale attribute for column, 
distinct type, structured type, array type, attribute of 
structured type, routine, cast, target type, type mapping, or 
global variable "ADD_ON_COLUMN" is not valid.  LINE NUMBER=8. 
SQLSTATE=42611 
 
The error only occurs if all result columns of the cursor 
definition are named.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Users using prior version than DB2 V9.7 FP5                  * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* UNTYPED NULL IN A PL/SQL PROCEDURE CURSOR DEFINITION RESULTS * 
* IN                                                           * 
* SQLCODE -604, SQLSTATE 42611                                 * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 V9.7 FP5                                      * 
****************************************************************
Local Fix:
Cast the NULL value to a datatype or remove the NULL column 
correlation name
available fix packs:
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
First Fixed in V9.7 FP5
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
09.09.2010
09.12.2011
09.12.2011
Problem solved at the following versions (IBM BugInfos)
9.7.FP5
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.5 FixList