March 6, 2013 at 1:21 am
Comments posted to this topic are about the item Replace Special Character and Keep What You Want
April 14, 2013 at 4:32 pm
Thank you for your effort but your code doesn't actually work as claimed. Try the following and see why. You need to go back to Books Online and learn a bit more about PatIndex and LIKE comparisons.
SELECT DBO.fn_replace_special_char('test,1^23@[sql].com')
Also, consider the use of a Tally Table instead of a WHILE loop. If you don't know what that is or how it can be used to replace certain loops in a highperformance manner, please see the following article.
http://www.sqlservercentral.com/articles/T-SQL/62867/
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply