...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.
is pronounced ree-bar and is a Modenism for R
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs