Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a Cursor, Why?
Message
From
31/08/2010 14:11:36
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01479241
Message ID:
01479473
Views:
47
>>
>>We're talking SQL Server cursors here - not VFP.
>
>Yes, I know. If you have a reason to believe they are worse in SQL please enlighten me.

Here is a link that I found helpful

http://www.sqlbook.com/SQL/Avoiding-using-SQL-Cursors-20.aspx

I rewrote a SP to recalculate some Quantity On Hand issues. Using cursors it took 7+ HOURS. Rewritten using temp tables it runs in 10 minutes!

I initially thought the same thing about cursors as you did Mike, and don't know why cursors are such a dog in SQL, but I am convinced that temp tables are the only way to go!

-- cmt
Carsten M. Thode
Previous
Reply
Map
View

Click here to load this message in the networking platform