select distinct pipeId=substring(a.PipeIn,b.number,charindex(',',a.PipeIn+',',b.number)-b.number)
from B_PipeSet_Info a
join master..spt_values b on b.type='P'
where charindex(',',','+a.PipeIn,b.number)=b.number
2023-12-04 15:01:22
select distinct pipeId=substring(a.PipeIn,b.number,charindex(',',a.PipeIn+',',b.number)-b.number)
from B_PipeSet_Info a
join master..spt_values b on b.type='P'
where charindex(',',','+a.PipeIn,b.number)=b.number