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

MERGE STATEMENT WITH PARAMETER MARKER AS SOURCE RETURNS SQL0901N UNDER
CERTAIN CONDITIONS

Produkt:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problembeschreibung:
A MERGE statement may return SQL901N: 
SQL0901N  The SQL statement or command failed because of a 
database system 
   error. (Reason "invalid qnc assigment".)  SQLSTATE=58004 
 
when the following conditions are satisfied: 
(1) a merge source column, C, in the table-reference is derived 
from a parameter marker 
(2) the merge statement has an INSERT operation 
(3) the VALUES clause of the INSERT operation references a 
function for which C is a function argument 
 
The error stack looks like the following: 
 
************* TRACE ERROR STACK (Recent Errors First) 
************ 
---------------------------------------------------------------- 
-------------- 
sqlnn_cmpl                [340]:rc(-2144272270) Global semantics 
processing 
sqlns_qgs                 [105]:rc(-2144272270) call 
sqlns_handle_merge_stmt 
sqlns_handle_merge_stmt   [100]:rc(-2144272270) Call 
sqlns_expand_merge 
sqlnq_expand_merge        [1040]:rc(-2144272270) map expressions 
to other qun 
sqlnq_pt_qun_upd_all_exps [110]:rc(-2144272270) call cond_proc 
 
sqlnq_pid::qun_update     [ 21]:rc(-2144272270) replace qnc 
called 
sqlnq_pid::replace_qnc    [100]:rc(-2144272347) invalid qnc 
assigment 
---------------------------------------------------------------- 
-------------- 
DB21034E  The command was processed as an SQL statement because 
it was not a 
valid Command Line Processor command.  During SQL processing it 
returned: 
SQL0901N  The SQL statement or command failed because of a 
database system 
error. (Reason "invalid qnc assigment".)  SQLSTATE=58004 
 
Example: 
CREATE TABLE T1 (C1 VARCHAR(20), C2 VARCHAR(20)) ORGANIZE BY 
ROW; 
 
MERGE INTO T1 AS TARGET 
USING ( VALUES ( 'abc',? )  ) AS SOURCE (C1, C2) 
ON (SOURCE.C1 = TARGET.C1) 
WHEN NOT MATCHED THEN 
 INSERT (C1,C2) 
 VALUES ( SOURCE.C1, LCASE (SOURCE.C2));
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Update to 10.5.0.5                                           * 
****************************************************************
Local-Fix:
If possible, move the function from the VALUES clause of the 
merge INSERT operation into the merge source (table-reference). 
 
For example, modify the MERGE statement in the example above to 
the following: 
MERGE INTO T1 AS TARGET 
USING ( VALUES ( 'abc',LCASE(?) )  ) AS SOURCE (C1, C2) 
ON (SOURCE.C1 = TARGET.C1) 
WHEN NOT MATCHED THEN 
 INSERT (C1,C2) 
 VALUES ( SOURCE.C1, SOURCE.C2);
Lösung
Problem Fixed In 10.5.0.5
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
03.06.2014
27.03.2015
27.03.2015
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.5.0.5 FixList