DDL in PL/SQL procedure
5 pts.
0
Q:
DDL in PL/SQL procedure
I have a question, i create drop and create a table in pl/sql proc using execute immediate. Later I declare a ref cursor, to process data from table created. Problem is the procedure executes correctly, but after execution procedure becomes invalid. How can i solve this issue. Thanks in advance.
ASKED: Mar 11 2009  7:13 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
29795 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
The procedure becomes invalid because it references the table you drop and re-create.

I think you will need to change your procedure to use dynamic sql for all operations related to the table you drop.

-------------------

You can use temp tables instead creating and dropping tables in your database. Even better depending on the amount of data you can use table variables. You can find information on both in Books On Line or search google.

-Koverton44
Last Answered: Mar 11 2009  10:32 PM GMT by Carlosdl   29795 pts.
Latest Contributors: Koverton44   150 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0