Home » Developer & Programmer » Forms » MERGE statement (oracle 10g, forms 6i)
MERGE statement [message #456730] Wed, 19 May 2010 06:29 Go to next message
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 messageGo to next message
cookiemonster
Messages: 13938
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.
Re: MERGE statement [message #456735 is a reply to message #456730] Wed, 19 May 2010 06:49 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Maybe Forms 6i do not support MERGE.
Re: MERGE statement [message #456751 is a reply to message #456735] Wed, 19 May 2010 07:30 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I'm pretty sure that's what I said?
Re: MERGE statement [message #456755 is a reply to message #456751] Wed, 19 May 2010 07:47 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I bet you are.

It seems that we were writing a message at the same time (more or less) so - when I posted mine, yours was already here.
Re: MERGE statement [message #456757 is a reply to message #456755] Wed, 19 May 2010 07:49 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Didn't notice the time stamp, thought your reply turned up much later for some reason.
Re: MERGE statement [message #456763 is a reply to message #456757] Wed, 19 May 2010 07:53 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you didn't
SYNCHRONIZE;
/forum/fa/1600/0/
Re: MERGE statement [message #456766 is a reply to message #456763] Wed, 19 May 2010 07:55 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Smile
Previous Topic: FRM-47023
Next Topic: Refresh datablock after DML operation(s)
Goto Forum:
  


Current Time: Thu Sep 19 20:08:31 CDT 2024