Home Forums SQL Server 2008 T-SQL (SS2K8) how to replace this cursor with set based solution? RE: how to replace this cursor with set based solution?

  • It was easy to find the solution with the DDL and sample data you posted (I had to run the original query to get the expected results).

    The important thing is that you understand what's happening so you can mantain it and replicate it in other cases. If you need help with APPLY, take a look at these articles, search more information on the web or ask any questions here. 😉

    Understanding and Using APPLY (Part 1)[/url]

    Understanding and Using APPLY (Part 2)[/url]

    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