>>SQL Server is all about set-based operations. If you can perform your process with set-based, it will be better than using cursors.
>>If there is absolutely no set-based alternative, then I suggest to read Brad Schulz series about cursors
>>
>>
The Truth about Cursors - Part 1>>
>>and other parts.
>
>I'm not sure what you mean by set based operations
>
>Thanks
Say, in VFP you can do row by row processing using this code
select AliasName
SCAN
replace ...
ENDSCAN
In SQL Server cursors will be the analogue of the code above.
However, if you can do just one UPDATE command to change all records at once, in SQL Server it will perform much faster, as this is what SQL Server is designed for.
In other words, you need to only use cursors when there is no set-based alternative or in the very rare cases when cursors perform better than set-based solution.
If you do need to use cursors, then please use them correctly (and Brad shows how in his blog posts).
If it's not broken, fix it until it is.
My Blog