home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC89491 Status: Geschlossen

SQL0206N ERROR REFERENCING COLUMN RETURNED FROM A ASSOCIATIVE ARRAY OR
RECORDS ORACLE COMPATIBILITY MODE

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problembeschreibung:
When trying to reference a column returned from a associative 
array of records 
Oracle compatibility mode, the following error may occur. 
 
select * from table (p1.mytabfunc()) where f1 > 10 
SQL0206N  "F1" is not valid in the context where it is used. 
SQLSTATE=42703 
 
This occurs because the columns in the function are being 
returned as system generated names such as 1, 2, 3 instead of 
the original name such as "f1" 
 
The function has to return a array of records as in this example 
create or replace package p1 
as 
 type myrec is record ( 
   f1 number(5), 
   f2 varchar(10) 
 ); 
 type mycoll is table of myrec index by binary_integer; 
 
 function mytabfunc return mycoll; 
end; 
 
describe select * from table (p1.mytabfunc()) 
 
 Column Information 
 
 Number of columns: 3 
 
 SQL type        Type length  Column name   Name length 
 --------------  -----------  ------------  ----------- 
 497   INTEGER             4  1                       1 
 485   DECIMAL          5, 0  2                       1 
 449   VARCHAR            10  3                       1 
 
This APAR avoids the error by allowing the name of the column to 
be used in SQL statements.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 v10.1 Fixpack 3                               * 
****************************************************************
Local-Fix:
As a workaround, the SQL statement can be re-written to rename 
the columns using the "AS" clause such as below: 
select * from table (p1.mytabfunc()) as t (idx, field1, field2) 
where field1 > 1
verfügbare FixPacks:
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Lösung
First fixed in DB2 v10.1 Fixpack 3
Workaround
keiner bekannt / siehe Local-Fix
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC95441 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
11.01.2013
07.10.2013
07.10.2013
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.3 FixList
10.1.0.3 FixList