February 27, 2006 at 11:11 pm
im using a cursor in a stored procedure in which im calling itself i.e its recursive.
i want to use a cursor such that evry time the SP calls itself a new cursor shuld be created and when it returns the cursor should be deallocated.
is there a cursor property by which i can implement this.
plz.......help
viral
February 28, 2006 at 2:10 am
Before further advising, this looks like a bad way to do things. Can you explain the logic and detail of what you're trying to achieve?
March 1, 2006 at 6:31 am
When you declare your cursor there is a LOCAL option you can include which makes the cursor local to that stored procedure. For recursive procedures when there is no way around using cursors then this is what you would have to do.
March 1, 2006 at 10:01 pm
Hi,
One of the best pratices is not use CURSORS in procedures. try to check can your logic can be replaced with CTE's. i'm sure it should help u out
Regards,
Anand.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply