FAQ
Members List
Calendar
Mark Forums Read
Replacing multiple statements with a MERGE
dbTalk Databases Forums
Databases
comp.databases.ibm-db2
Replacing multiple statements with a MERGE
comp.databases.ibm-db2
comp.databases.ibm-db2
Discuss
Replacing multiple statements with a MERGE
in the
comp.databases.ibm-db2
forum.
Page 2 of 2
<
1
2
Thread Tools
Display Modes
#
11
Tonkuma
Posts: n/a
Re: Replacing multiple statements with a MERGE -
06-30-2010 , 05:31 PM
I want to add a note.
Quote:
WHEN NOT MATCHED
AND EXISTS
(SELECT 0
FROM Auctions e
WHERE e.item_id = b.item_id
) THEN
INSERT
I also tried:
WHERE m.item_id = a.item_id
It returned error:
SQL0206N "A.ITEM_ID" is not valid in the context where it is used.
So, I thought that the target table can't be referred in WHEN NOT
MATCHED clause.
And it would be rational.
Tonkuma
Page 2 of 2
<
1
2
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
vB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Contact Us
-
dbTalk Databases Forums
-
Archive
-
Top