Home » SQL & PL/SQL » SQL & PL/SQL » declare and define cursor in different procedures (merged)
declare and define cursor in different procedures (merged) [message #391460] Thu, 12 March 2009 05:38 Go to next message
gauravpuri2002
Messages: 24
Registered: October 2007
Location: Bangalore
Junior Member
Hi

I have 2 procedures p1 and p2 .I have declared cursor c1 in p1 and i need to open that cursor in p2 how can i do that.
here p1 is calling p2.

Regards
gaurav
Re: declare and define cursor in different procedures [message #391461 is a reply to message #391460] Thu, 12 March 2009 05:41 Go to previous message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Use a package and declare your cursor in a package header.

If it is a dynamic (ref) cursor, it is only defined at open time, so you can't "declare" it in another procedure than you open.

Can you precise what you are trying to do.

Regards
Michel
Previous Topic: updating multiple rows in loop
Next Topic: SQL Database Name. (HEEELP)
Goto Forum:
  


Current Time: Thu Dec 05 20:25:39 CST 2024