Has anyone used temporary tables with ORACLE 8i?  My goal is to create a temporary table and populate it from a select statement.  I then want to manipulate data and return it as a recordset.  I cannot get the stored procedure created as the delivery method for the code I’ve written.

 

PSEUDO CODE:

 

--create temporary table

Create global temporary table dbatest(

field

,field

, …

) on commit delete rows;

 

-- populate temporary table from a select statement

INSERT INTO dbatest (field,field,…)
SELECT field,field,…
FROM table
WHERE something = something

 

--special processing of data in temp table

SELECT field

FROM dbatest
START WITH field = 0
CONNECT BY field = PRIOR field

 

 

The above code works just fine when I process it.  I need this code to be inside a stored procedure so I can deliver the data to CF.

 

When I execute the create stored proc statement, it bombs on dbatest.  It says dbatest must be declared.  Why and how do I declare a temporary table?

 

Thanks

 

Tom Schreck

Applications Developer

Dresser, Inc.

15455 Dallas Parkway, Suite 1100

Addison, TX  75001-4690

972-361-9943

[EMAIL PROTECTED]

 

 

 

 

<<attachment: image001.jpg>>

Reply via email to