MERGE statement [message #456730] |
Wed, 19 May 2010 06:29 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
snsiddiqui
Messages: 172 Registered: December 2008
|
Senior Member |
|
|
I am using MERGE statement first time in my application but I am facing error, Please check the given code and reply.
begin
merge into store.comm_dept a
using factory_data.comm_dept b
on (a.cd_dcode = b.cd_dcode)
when matched then
update
set b.cd_descr = a.cd_descr,
b.cd_type = a.cd_type
when not matched then
insert (cd_descr,cd_type)
values (a.cd_descr,a.cd_type);
end;
ERROR IS: encountered the symbol 'INTO' when expecting on of the following:
:=.(@%;
|
|
|
Re: MERGE statement [message #456734 is a reply to message #456730] |
Wed, 19 May 2010 06:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Most likely forms 6i doesn't recognize the merge command, since it wasn't introduced until oracle 9i.
Move the merge statement into a database procedure and call that from your form.
|
|
|
|
|
|
|
|
|