我试图在 SQL Server 的下面的字符串中从右边找到倒数第二个词。
Declare @text as varchar(60)
Set @text = 'Next Generation Customer Service'
我希望输出为“客户”
有人可以帮忙吗? 提前致谢。
我尝试使用 charindex、reverse 等
Declare @text as varchar(60)
Set @text = 'Next Generation Customer Service'
select substring( @text, charindex('Customer',@text),len('Customer'))