declare @batteryTags nvarchar(2000)='带纽扣电池,纯纽扣电池,内置锂电,音箱,手柄,电子烟,情趣用品(带纽扣电池),纯锂电池,移动电源' select SUBSTRING(@batteryTags, number ,CHARINDEX(',',@batteryTags+',',number)-number) as name from master..spt_values s where s.number >=1 and s.type = 'P' and SUBSTRING(','+@batteryTags,s.number,1) = ','