SDU Tools: Translate
I love it when SQL Server gets brand new T-SQL language features.
SQL Server 2017 added a great new language feature called TRANSLATE. It’s been in some other products like Oracle for a while but it’s just been added to SQL Server.
Imagine I have a string like this:
’[02] 9992:2343’
But what I really want is one like this:
’(02) 9992-2343’
Up to SQL Server 2016, I could do this with a series of replace statements:
2017-11-08