Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: MERGE statement not running
Hello Randy,
I agree with the others who point out that your version of SQL*Plus may be too low, and that it may not recognize MERGE as a valid statement.
It occurs to me though, that you can likely work around the issue using an anonymous PL/SQL block. This is because (I'm reasonably certain) SQL*Plus looks only at the first keyword of a statement or block. For example:
BEGIN
MERGE blah, blah, blah
END;
/
SQL*Plus will look at the word BEGIN, recognize that it's getting a block, and send the entire block off to Oracle to parse without looking inside it. Thus, SQL*Plus won't be tripped up by the MERGE statement. The block hides that statement from SQL*Plus.
Best regards,
Jonathan Gennick --- Brighten the corner where you are http://Gennick.com * 906.387.1698 * mailto:jonathan@gennick.com
Join the Oracle-article list and receive one article on Oracle technologies per month by email. To join, visit http://four.pairlist.net/mailman/listinfo/oracle-article, or send email to Oracle-article-request_at_gennick.com and include the word "subscribe" in either the subject or body.
Monday, February 9, 2004, 5:22:24 PM, Steiner, Randy (RASTEIN_at_NYCT.com) wrote:
SR> On my 9.2.04 db, I am trying to run a MERGE statement and I get the SR> following error: SR> SP2-0734: unknown command beginning "merge into..." - rest of line ignored. SR> SP2-0734: unknown command beginning "using ( se..." - rest of line ignored. SR> SP2-0042: unknown command "MINUS" - rest of line ignored. SR> I do not think it is my sql, because I copied an example from asktom and gotSR> the same error on his merge statement. Is there a script or setting I SR> missed?
SR> ---------------------------------------------------------------- SR> Please see the official ORACLE-L FAQ: http://www.orafaq.com SR> ---------------------------------------------------------------- SR> To unsubscribe send email to: oracle-l-request_at_freelists.org SR> put 'unsubscribe' in the subject line. SR> -- SR> Archives are at http://www.freelists.org/archives/oracle-l/SR> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
SR> -----------------------------------------------------------------Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
![]() |
![]() |