Home » SQL & PL/SQL » SQL & PL/SQL » global temporary tables
global temporary tables [message #368] Thu, 07 February 2002 10:10 Go to next message
LI810
Messages: 25
Registered: February 2002
Junior Member
Please help.

what is the problem with the following?
I created the table using this statement in stored procedure:

execute immediate 'create global temporary table temp_current3(tbl_nme_x varchar2(50),rowcount number(12))';

than I would like to use this table in the procedure:

select TBL_NME_X,
row_count
from temp_current3
where tbl_nme_x=v_table
and row_count > v_count;

but I got error message: "Identifier temp_current3 must be declared"

Thanks for help
Re: global temporary tables [message #369 is a reply to message #368] Thu, 07 February 2002 13:44 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
create global temporary table outside of procedure.

SQL>create global temporary table temp_current3(tbl_nme_x varchar2(50),rowcount number(12)) on commit preserve rows;

use that table in procedure. temporary table data will be automatically deleted by oracle when u exit from session. above statement creates session specific temporary table .
Previous Topic: HELP ME!! CURSOR error while trying to FETCH.
Next Topic: Re: Regarding Storage Of Images Into Database
Goto Forum:
  


Current Time: Sat Sep 25 01:10:20 CDT 2021