Eric Mamet (10/31/2013)
I know but I was hoping it would be fast...Just talked to my customer and I'll try using CLR!
Yipee!!! 😀
Heh... hate to throw a wet blanket on your fire but you don't need to resort to an SQLCLR function for something so simple (although if you're comfortable with that, then fire away! It can be a great solution when done properly.:-D). Please see the example that Sean Pierce provided in his post above and please see the following article that demonstrates the problem and the fix (the "iSF").
How to Make Scalar UDFs Run Faster (SQL Spackle)
[/url]
--Jeff Moden
Change is inevitable... Change for the better is not.