• tocy1980 (11/13/2016)


    Thank you Jeff.

    Really I am still the newbie in SQL so this is still hard for me...

    At this moment I am just trying to find for me familiar solution and I need more time for SQL 🙂

    I'll try this solution and let you know my final result.

    Cheers! 🙂

    That's why I'm telling you that you're making a seriously grave mistake in the design... so that you don't stay a "newbie" forever. 😉

    --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)