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 | |
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 |