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 -> Create a table in a procedure

Create a table in a procedure

From: Andrew <landau1999it_at_yahoo.it>
Date: 19 Dec 2002 06:02:10 -0800
Message-ID: <e4d18387.0212190602.5b0a839a@posting.google.com>


FIrst of all Marry Christmas and Happy new Year to all people around. I'm a newbie on a Oracle DB world and I need need to create a procedure like that

  PROCEDURE sp_GenerateTable(idLabel IN number) IS   BEGIN

      EXECUTE IMMEDIATE 'CREATE TABLE '|| tableToCreate ||'

(
STAR varchar2(200), WARS varchar2(100) )';

    END;   

    procedure sp_CreateTable(tableName IN varchar2) IS     BEGIN

      EXECUTE IMMEDIATE 'CREATE TABLE '|| tableName ||'

(
TSAT varchar2(200), WARS varchar2(100) )';

    END;
 +++++++++++++++++++++++++++++++++++++++++++++++++

 but when I try ti execute the procedure I get this error

SQL> exec pckTableManager.sp_generatetable(2); BEGIN pckTableManager.sp_generatetable(2); END;

*
ERRORE alla riga 1:
ORA-04068: lo stato esistente dei package è stato eliminato ORA-04061: lo stato esistente di package "CSGD.PCKTABLEMANAGER" è stato invalidato
ORA-04065: esecuzione non effettuata, modifica o eliminazione di package "CSGD.PCKTABLEMANAGER"
ORA-06508: PL/SQL: impossibile trovare unità lib chiamata ORA-06512: a line 1

(sorry it's a Ora9i on italian version. I hope that the error number will suffice). Thanks for the help and happy holydays to all ! Received on Thu Dec 19 2002 - 08:02:10 CST

Original text of this message

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