G
Guest
Hello,
If I have a string "Mr. Bill Gates" stored as an nvarchar variable how would I split it into two strings "Mr. Bill" and "Gates" using T-SQL? I assume I could use Substring but to use that I would have to know the index of the last whitespace and don't know how to get that index. Any suggestions would be appreciated. Thanks!
If I have a string "Mr. Bill Gates" stored as an nvarchar variable how would I split it into two strings "Mr. Bill" and "Gates" using T-SQL? I assume I could use Substring but to use that I would have to know the index of the last whitespace and don't know how to get that index. Any suggestions would be appreciated. Thanks!