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

Home -> Community -> Usenet -> c.d.o.server -> Begin... END; gives odd error:

Begin... END; gives odd error:

From: <erich.keane_at_verizon.net>
Date: 12 Oct 2006 12:28:37 -0700
Message-ID: <1160681317.110047.156510@e3g2000cwe.googlegroups.com>


Ok, Ive researched this for what seems like forever, but I still get the same error.
I first tried it without the Begin and End, and I got Oracle Error 00911 (as expected). Everywhere I looked said to add Begin before it, and End; after it, yet I get that error.

Please help!

Here is the command, and error text, I know the query does not entirely make sense, but it is generated that way for a reason:

BEGIN

ALTER TABLE "SYSTEM"."OpenBOXTest" DROP PRIMARY KEY;
ALTER TABLE "OpenBOXTest" DROP COLUMN "ObxTestCol2" ;
ALTER TABLE "OpenBOXTest"  ADD ("ObxTestCol3" integer  DEFAULT ''0'' );
ALTER TABLE "SYSTEM"."OpenBOXTest" ADD PRIMARY KEY ("ObxTestCol1" );
END;
Error report:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "ALTER" when expecting one of the
following:

   begin case declare exit for goto if loop mod null pragma    raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
   close current delete fetch lock insert open rollback    savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
<an alternatively-quoted SQL string>

The symbol "lock was inserted before "ALTER" to continue.

ORA-06550: line 2, column 36:
PLS-00103: Encountered the symbol "DROP" when expecting one of the
following:

   . , @ in <an identifier>
<a double-quoted delimited-identifier> partition subpartition
Received on Thu Oct 12 2006 - 14:28:37 CDT

Original text of this message

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