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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Looping in SQL

Re: Looping in SQL

From: Frank <franjoe_at_frisurf.no>
Date: Sat, 24 Mar 2001 16:59:16 +0100
Message-ID: <3A3v6.568$NR.34613@news3.oke.nextra.no>

Hi!

DDL statements are not allowed directly in PLSQL. You must use DBMS_SQL (or possibly the new solution in 8i).

What kind of failures do you expect?

Frank

A test:

BEGIN    ALTER TABLE test ADD col3 NUMBER;

EXCEPTION
   WHEN OTHERS THEN
      ALTER TABLE END;
/

compiles to:

   ALTER TABLE test ADD col3 NUMBER;
   *
ERROR at line 3:

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

begin declare exit for goto if loop mod null pragma raise return select update while <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback savepoint set sql execute commit forall
<a single-quoted SQL string>
Received on Sat Mar 24 2001 - 09:59:16 CST

Original text of this message

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