Main Page | Report this Page
Computers Forum Index  »  Computer - Databases - IBM DB2  »  MERGE - gross error...
Page 1 of 1    

MERGE - gross error...

Author Message
Arun Srinivasan...
Posted: Tue Oct 20, 2009 8:46 am
Guest
merge into arun.test1 a
using arun.test2 b
on a.a=b.a


when matched then delete
when not matched then update set a = 99;
[IBM][CLI Driver][DB2/LINUXX8664] SQL0104N An unexpected token "when
not matched then" was found following "matched then delete". Expected
tokens may include: "<merge_when_spec1>". SQLSTATE=42601

2 rows merged because of ERROR.


I found each of the syntax diagrams containing both 'WHEN MATCHED' and
'WHEN NOT MATCHED', now, this is mind boggling!!!!!!!!!!!!!!!!!!!!!!!!!
 
Arun Srinivasan...
Posted: Tue Oct 20, 2009 9:24 am
Guest
On Oct 20, 1:46 pm, Arun Srinivasan <arunro... at (no spam) gmail.com> wrote:
Quote:
merge into arun.test1 a
using arun.test2 b
on a.a=b.a

when matched then delete
when not matched then update set a = 99;
[IBM][CLI Driver][DB2/LINUXX8664] SQL0104N  An unexpected token "when
not matched then" was found following "matched then delete".  Expected
tokens may include:  "<merge_when_spec1>".  SQLSTATE=42601

2 rows merged because of ERROR.

I found each of the syntax diagrams containing both 'WHEN MATCHED' and
'WHEN NOT MATCHED', now, this is mind boggling!!!!!!!!!!!!!!!!!!!!!!!!!

Sorry, it was because i used something but 'insert or signal in the
WHEN NOT MATCHED clause....

http://bytes.com/topic/db2/answers/183732-merge-syntax-error
 
Serge Rielau...
Posted: Tue Oct 20, 2009 2:38 pm
Guest
Arun Srinivasan wrote:
Quote:
On Oct 20, 1:46 pm, Arun Srinivasan <arunro... at (no spam) gmail.com> wrote:
merge into arun.test1 a
using arun.test2 b
on a.a=b.a

when matched then delete
when not matched then update set a = 99;
[IBM][CLI Driver][DB2/LINUXX8664] SQL0104N An unexpected token "when
not matched then" was found following "matched then delete". Expected
tokens may include: "<merge_when_spec1>". SQLSTATE=42601

2 rows merged because of ERROR.

I found each of the syntax diagrams containing both 'WHEN MATCHED' and
'WHEN NOT MATCHED', now, this is mind boggling!!!!!!!!!!!!!!!!!!!!!!!!!

Sorry, it was because i used something but 'insert or signal in the
WHEN NOT MATCHED clause....

http://bytes.com/topic/db2/answers/183732-merge-syntax-error
.... so you're all good?



--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab
 
Arun Srinivasan...
Posted: Thu Oct 22, 2009 9:23 am
Guest
Ya Sarge!!! Thanks for following up....
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Dec 01, 2009 12:23 am