MERGE statement issue over DBLINK

668 views
Skip to first unread message

swaroop gowda

unread,
Oct 1, 2010, 5:29:33 PM10/1/10
to oracle...@googlegroups.com
Hi,
 
I am using MERGE to UPDATE/INSERT into table over using DBLINK.
 
But I am getting these below errors,
 
ORA-02064: distributed operation not supported
ORA-01008: not all variables bound
 
MERGE INTO SCOTT.TAB@TIGER_DBLINK trc USING
TAB src ON (trc.col1 - src.col1)
 
WHEN MATCHED THEN
UDPATE SET trc.col2 = src.col2  -- If I comment this one and run I am getting ORA-02064: distributed operation not supported
-- If I run along with UPDATE statement I am getting ORA-01008: not all variables bound
 
WHEN NTO MATCHED THEN
INSERT (trc.col1,
trc.col2)
VALUES
(src.col1,
src.col2);
 
Please let me know if any one has idea reagrding above errors.


--
Thanks & Regards
Swaroop Thailuru Swamy

ddf

unread,
Oct 3, 2010, 4:49:21 PM10/3/10
to Oracle PL/SQL
You'll be seeing more than those errors if this is the actual code:

MERGE INTO SCOTT.TAB@TIGER_DBLINK trc USING
TAB src ON (trc.col1 - src.col1)


so I'll presume it isn't since the '-' should be '='. So show us the
actual code, please.

Also, this is not valid syntax for an insert statememt column list:

WHEN NTO MATCHED THEN
INSERT (trc.col1,
trc.col2)
VALUES
(src.col1,
src.col2);

as it should be this:

WHEN NTO MATCHED THEN
INSERT (col1, col2)
VALUES
(src.col1,
src.col2);

which should resolve the "not all variables bound" error and allow you
to run the merge to completion since you won't need to comment sny
code.


David Fitzjarrell
Reply all
Reply to author
Forward
0 new messages