• Igor Micev (3/14/2014)


    Do you know that cursors' performance is nearly the same to the set-based statements when they are run on up to about 1000 rows.

    Not really, it might look that way with small sets of data, but it's mostly perception. A set based query will run several times faster than a cursor in most cases.

    You should find a set-based solution, which is not complex for your case. You can use temp tables or CTEs...

    Like the ones posted in this thread or the other?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2