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?