Working with strings in SQL Server isn’t as easy or powerful as using any programming language, but, I’m sure that more than once you had to to some data manipulation directly in the database, this may help you out, and it doesn’t use Loops, CLR or XML The idea is to exploit set logic, as opposed to the classic program logic of when you’re usually playing with strings in...
A quick function to remove (or keep only) string patterns from SQL Server Strings
A