How can I remove certain chars before the space in T-SQL?
I'm trying without any luck to come up with a method to pass
Bruno Miguel Alexandre into B. Miguel Alexandre
Bruno Alexandre into B. Alexandre
just in SQL so I can make this part of a big query in a Store Procedure
can anyone provide me with any help? Any function that you guys might already have?
Take 1st character + everything from the space. The 8000 is to avoid LEN calls otherwise
LEFT(MyValue, 1) + '.' + SUBSTRING(MyValue, CHARINDEX(' ', MyValue), 8000)