• XMLSQLNinja (9/27/2012)


    CELKO (9/15/2012)


    ...And then there is a high cost of CLR. .

    Hogwash. There is nothing "high cost" about a well written CLR.

    Avoid this kludge if you can.

    There's nothing "kludgy" about using a CLR to solve a problem that can't be solved by using T-SQL. Period.

    I concur with the previous posters who suggest using a CLR for regular expressions.

    As with all else, "It Depends". In the case of RegEx CLR vs Like and PatIndex... if you can actually work it out with Like, PatIndex, or even CharIndex, it will usually be faster than making a call to a RegEx CLR. A couple of us just went through all of this on another thread a couple of months ago and the LIKE expressions blew the doors off the RegEx CLR.

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