• Jeff Moden (12/18/2012)


    @Sachin,

    I agree that the CLR Regex method should be the fastest although I've not seen any performance testing on it.

    The questions I have for you is...

    1. Can you use CLR or do you need a 100% T-SQL solution?

    2. Is the maximum length of the data <= 8K bytes?

    Actually, I have to take that back. CLR would be the fastest method but only if you DON"T use Regex. I've recently seen many performance tests and either some dedicated CLR or some dedicated T-SQL will usually smoke RegEx according to the tests I've seen.

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