• tacy.highland (12/2/2016)


    The only thing I have against these nice simple answers:

    As you can see, the neat thing about nice simple answers is that they're nice and simple to modify to your needs. 😉

    There's a whole lot of power in the functions of any language. If I need to learn a new language, one of the first things I do is to check the documentation for all the functions to see what's available. Unfortunately, SQL Server no longer installs "Books Online" by default nor do they provide it. You either have to download it or set it up to look on the web. It's definitely worth doing either way.

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