• Mark Eckeard (9/17/2012)


    Jeff - thanks, I'll keep this in mind in case I have to do something similar in the future.

    The advantage to making it a UDF is for code re-use. I was thinking he may need to this in other places and it would make it easier although he could certainly use reverse the words directly in his query if necessary.

    Mark

    Thanks for the feedback, Mark. I absolutely agree that it should be a UDF for the very reasons you stated. That's why I included my code as a UDF... just not a scalar one. 🙂

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