Question Locked

How to create a stored proc that uses temp tables

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

2 replies

This discussion is closed to new replies.