Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Create a table in a procedure
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) )';
+++++++++++++++++++++++++++++++++++++++++++++++++
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
![]() |
![]() |