Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Merge Problem
"mike" <hillmw_at_charter.net> a écrit dans le message de
news:1111626234.865664.20430_at_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
|
merge is only available in 9i and up releases. What is yours?
Regards
Michel Cadot
Received on Wed Mar 23 2005 - 23:00:29 CST