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

Home -> Community -> Usenet -> c.d.o.server -> Creating and accessing a table from within a procedure

Creating and accessing a table from within a procedure

From: <vmisetich_at_my-deja.com>
Date: Fri, 03 Dec 1999 17:42:24 GMT
Message-ID: <828ve0$f2j$1@nnrp1.deja.com>


Hello!

Can someone tell me if it's possible to both create and insert into a temporary table from within one stored procedure? I've already tried the following, but it doesn't seem to work:

create or replace procedure test_temp_table as

begin

    execute immediate 'create global temporary table ttt(testfield number(10))';

    insert into ttt(testfield) values(1);

end;
/

When I try to compile the proc, I get:
PL/SQL: SQL Statement ignored
PLS-00201: identifier 'TTT' must be declared

Can someone show me the correct way (if there is one) to do this?

Thanks in advance,
Vince

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Dec 03 1999 - 11:42:24 CST

Original text of this message

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