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 IC64191 Status: Geschlossen

SQL0901N IS RETURNED WHEN RUNNING MERGE STATEMENT WITH INSERT CLAUSE THAT
USES A SCALAR SQL FUNCTION IN A DPF ENVIRONMENT.

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
When using MERGE statement with INSERT clause that uses scalar 
sql function in a DPF environment, SQL0901n error is returned. 
 
EX: 
 
create table <target_table> (tc1 int not null, tc2 int, tc3 int) 
partitioning key (tc1); 
create table <source_table> (sc1 int not null, sc2 int, sc3 
int); 
 
create function double1(inparm1 int) returns int 
language sql deterministic no external action reads sql data 
begin atomic 
  declare var1 int;-- 
  set var1 = inparm1 * 2;-- 
  return (var1);-- 
end; 
 
 
merge into <target_table> using (select sc1, sc2, sc3 from 
source_table) as src (ssc1, ssc2, ssc3) on (ssc1 = tc1) 
when matched then 
     update set tc2 = ssc2 
when not matched then 
     insert values (ssc1, ssc2, double1(ssc3)); 
--SQL0901N  The SQL statement failed because of a non-severe 
system error. 
--Subsequent SQL statements can be processed.  (Reason "Not 
exactly one 
--non-subquery input qun: ambiguous nextQun".)  SQLSTATE=58004 
 
 
 
THE ISSUE CRITERIA: 
 
-- DPF 
-- Merge with INSERT clause 
-- INSERT clause references a scalar SQL function
Problem-Zusammenfassung:
SQL0901N IS RETURNED WHEN RUNNING MERGE STATEMENT WITH INSERT 
CLAUSE THAT USES A SCALAR SQL FUNCTION IN A DPF ENVIRONMENT.
Local-Fix:
Modify each partitioning key column in the INSERT clause to a 
non-trivial expression like the following: 
 
merge into <target_table> using (select sc1, sc2, sc3 from 
<source_table>) as src (ssc1, ssc2, ssc3) on (ssc1 = tc1) 
when matched then 
     update set tc2 = ssc2 
when not matched then 
     insert values (case when (1=1) then ssc1 end, ssc2, 
double1(ssc3));
verfügbare FixPacks:
DB2 Version 9.1 Fix Pack 9  for Linux, UNIX and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.1 Fix Pack 10  for Linux, UNIX and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.1 Fix Pack 11  for Linux, UNIX and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.1 Fix Pack 12  for Linux, UNIX and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a 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 10 for Linux, UNIX, and Windows

Lösung
It is Fixed in DB2 v9.7 FP2
Workaround
keiner bekannt / siehe Local-Fix
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC67748 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
29.10.2009
06.07.2010
06.07.2010
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP2
Problem behoben lt. FixList in der Version
9.1.0.9 FixList
9.7.0.2 FixList