Re: MERGE statement not running

  • From: Jonathan Gennick <jonathan@xxxxxxxxxxx>
  • To: "Steiner, Randy" <RASTEIN@xxxxxxxx>
  • Date: Tue, 10 Feb 2004 09:05:31 -0500

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@xxxxxxxxxxx

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@xxxxxxxxxxx and 
include the word "subscribe" in either the subject or body.


Monday, February 9, 2004, 5:22:24 PM, Steiner, Randy (RASTEIN@xxxxxxxx) 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 got
SR> 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@xxxxxxxxxxxxx
SR> put 'unsubscribe' in the subject line.
SR> --
SR> Archives are at //www.freelists.org/archives/oracle-l/
SR> FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
SR> -----------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: