• Stamey (2/16/2011)


    That's great. I'd still like to learn how to deal with spaces for my case, as educational now, more than functional. I will probably be happier using what you have already developed for delimiter splitting.

    Thanks,

    Chris

    It's easy. In T-SQL, Spaces are no different than any other character except...

    1. '' = '{one space}' = '{virtually any number of spaces}' for comparison purposes.

    2. Trailing spaces are not recognized by LEN but are recognized by DATALENGTH.

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