• niladri.primalink (9/20/2013)


    Sorry For using the word 'it'.

    Actually the code what SScrazy sent to me is working for me.

    That's why I wrote it is working for me.

    If I hurt you then it is in my unbeknown.

    Thank you for the concern but you didn't hurt me. I'm more concerned about what you ended up using because While Loops and cursors can be quite slow. That's why I wanted to know what you ended up using.

    My recommendation would be to have a look at the code that Sean wrote for this. With apologies to Mark, Sean's code will run much more quickly.

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