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 -> Re: simple Stored procedure with drop, create table instruction...???

Re: simple Stored procedure with drop, create table instruction...???

From: Mark Plant <mplant_at_uk.oracle.com>
Date: Tue, 06 Jul 1999 11:32:46 GMT
Message-ID: <3781e878.4947377@newshost.uk.oracle.com>


Fred

You cannot have DDL (Data Definition Language) statements in PL/SQL.

To get around this, you can use dynamic SQL, via the DBMS_SQL package.

Mark

On Thu, 1 Jul 1999 16:17:13 +0200, "fred" <frederic.servais_at_advalvas.be> wrote:

>I'd like to create a stored procedure looking like that:
>
>CREATE PROCEDURE provToOper
>AS BEGIN
>
>DROP sequence fs_ssis2_oper.COMPANY_SEQ;
>CREATE TABLE fs_ssis2_oper.COMPANY AS (SELECT * FROM fs_ssis2_prov.COMPANY);
>
>END;
>
>But i always get an error message:
>
>PLS-00103: Encountered the symbol "DROP" when expecting one of the foll...
>
>(could not read what it is expecting... It would have been to easy ;-))
>
>Any Idea??
>
>
Received on Tue Jul 06 1999 - 06:32:46 CDT

Original text of this message

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