Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Creating and accessing a table from within a procedure
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