Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Inserting Into A Table Created In A Package
I have created a table in a package as follows:
CREATE OR REPLACE PACKAGE BODY TEST AS
PROCEDURE create_table
IS
cur integer;
rc integer;
BEGIN
cur := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cur, 'CREATE TABLE TEST_IT
(Y DATE NOT NULL, X NUMBER)',DBMS_SQL.NATIVE); rc := DBMS_SQL.EXECUTE(cur);
If I take out the insert_data procedure and the call to it, the package compiles fine and creates the table when executed.
How should I declare the table test_it so that it is recognized by the insert_data procedure? I had assumed that by placing create_table ahead of insert_data the table name would be available to insert_data.
Thanks for your help. Received on Fri Sep 21 2001 - 10:53:19 CDT