Erik Darling takes us through the seedy underbelly of T-SQL:
I have to do this a fair amount, and I always go look at this little cheat sheet that I have.
Then it occurred to me that it might be worth sharing the details here, in case anyone else runs into the same need.
The way I learned to do it is with SUBSTRING and CHARINDEX, which is a pretty common method.
That this is possible is great, but it’d be nice to have an easier approach. Thinking through that easier approach is outside the scope of this post…