• sarafpradeep (10/9/2013)


    Thank you Sean Lange, I did not think about it. I liked the idea of "Jeff Moden" but I am not sure about how to create a partitioned view.

    I would really appreciate if someone can help me or direct me to a forum having similar kind of solution.

    Thanks again.

    Read about the "partitioned view" in Books Online. If you don't know what that is, it's the "help" system for SQL Server and you can usually get there by pressing the {f1} key in SSMS. You should read about it... it'll really simplify this problem for you.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)