January 29, 2008 at 3:59 am
i want to use 2 cursor simeltaneously
January 29, 2008 at 9:06 am
Using cursors at all is frequently a poor choice to solve a problem. However, if you have to use two cursors, use two cursors. Declare both, open both, parse through both exactly as if you were only using one. No big deal.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 29, 2008 at 9:54 am
Just remember that @@fetch_status contains data based on the last fetch run regardless of which cursor it is.
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply