Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Merge Problem

Merge Problem

From: mike <hillmw_at_charter.net>
Date: 23 Mar 2005 17:03:54 -0800
Message-ID: <1111626234.865664.20430@g14g2000cwa.googlegroups.com>


I am trying to use the "merge" functionality and am getting some errors:

Oracle Error Code = 6550<P>ORA-06550: line 2, column 9: PLS-00103: Encountered the symbol "INTO" when expecting one of the following:

   := . ( @ % ;

ORA-06550: line 3, column 4:
PLS-00103: Encountered the symbol "USING" when expecting one of the
following:

   ( select values

ORA-06550: line 3, column 67:
PLS-00103: Encountered the symbol "ES" when expecting one of the
following:

   ; return returning intersect minus union

here is my sql:

begin
merge into mytable et
 USING ( Select * From mytable where id='111111') es  ON ( et.id = es.id )
WHEN MATCHED THEN
     UPDATE SET et.role = 'Super'
WHEN NOT MATCHED THEN
     Insert ( et.lmpeopleid, et.role ) values ( '111111','Super' ); end;

Anyone know why this is dying? I am using this url as reference material: http://www.quest-pipelines.com/newsletter-v4/0903_D.htm Received on Wed Mar 23 2005 - 19:03:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US