• SQL Galaxy (10/7/2015)


    Thanks for your replay..

    I am not a developer. but I will try my best.

    Could you give me any example for how will change existing nested cursor to set based method.

    You will need a developer for this. There are no fixed rules for the process; work out what the existing code does to the database and derive a set-based method to achieve the same endpoint.

    You could encourage folks from this community to help, by posting sample data for them to code against.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden