34,588
社区成员
发帖
与我相关
我的任务
分享
DECLARE @str VarChar(1000)
Set @str = '1,11,222,213,211,2341,342,34531'
Select Replace(@str,'213','')
-- 得到结果是:
1,11,222,,211,2341,342,34531
-- 我要的结果是:
1,11,222,211,2341,342,34531
DECLARE @str VarChar(1000)
Set @str = '1,11,222,213,211,2341,342,34531'
Select stuff(Replace(','+@str,',213',''),1,1,'')
DECLARE @str VarChar(1000)
Set @str = '1,11,222,213,211,2341,342,34531,'
Select Replace(@str,'213,','')