declare @some_text as nvarchar(20) = 'through 123 some
text';
select ltrim(rtrim(left(@some_text, charindex(' ', @some_text, charindex(' ', @some_text)+1))))
You could apply the same logic to go from the nth space in the occurrence, it would become more complex.
No comments:
Post a Comment