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

Home -> Community -> Usenet -> c.d.o.misc -> EXECUTE IMMEDIATE IN ORACE 9i

EXECUTE IMMEDIATE IN ORACE 9i

From: nickp <nickp_at_mmcc.co.uk>
Date: 11 Apr 2003 05:53:56 -0700
Message-ID: <81c48a9d.0304110306.5b7ddd50@posting.google.com>


HI,
Can anyone help?

I'm using SQL/PLUS from ORACLE 9i to test out some SQL. Here's the code:

BEGIN
  FOR r IN (SELECT 1 FROM all_tables WHERE table_name = 'ADDRESS')   LOOP
    EXECUTE IMMEDIATE 'DROP TABLE ADDRESS'   END LOOP;
END; But it returns the following error:

EXECUTE IMMEDIATE 'DROP TABLE ADDRESS';
            *
ERROR at line 4:
ORA-06550: line 4, column 13:
PLS-00103: Encountered the symbol "IMMEDIATE" when expecting one of the following: := . ( @ % ;
The symbol ":= was inserted before "IMMEDIATE" to continue.

I thought that the EXECUTE IMMEDIATE could handel a DDL Statement?

Any help

Cheers Nick Received on Fri Apr 11 2003 - 07:53:56 CDT

Original text of this message

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