How to create a stored proc that uses temp tables - TechRepublic
Question
April 5, 2010 at 06:38 AM
ratface

How to create a stored proc that uses temp tables

by ratface . Updated 16 years, 2 months ago

I am using pl/sql against an oracle database. I need to create a stored procedure that uses temp tables.

I found ‘execute immediate’ and used it for all of the DDL, for example,
execute immediate ‘ create table tempprimary’ … ;

The problem now is that my next statements are to populate the table:
insert into tempprimary
select distinct…

I get an error message that the table I just created does not exist.

Thanks in advance for your help.

Mary

This discussion is locked

All Comments