I am trying to change the code shown below to concatenate stringOriginaldeclare @string varchar(500)set @string = 'ABC,DEF,GHIJK,LMNOPQRS,T,UV,WXY,Z'declare @pos intdeclare @piece varchar(500)-- Need to tack a delimiter onto the end of the input string if one doesn't existif right(rtrim(@string),1) <> ',' set @string = @string + ','set @pos = patindex('%,%' , @string)while @pos <> 0 begin set @piece = left(@string, @pos - 1) print cast(@piece as varchar(500)) set @string = stuff(@string, 1, @pos, '') set @pos = patindex('%,%' , @string)endMinedeclare @string varchar(500)set @string = 'ABC,DEF,GHIJK,LMNOPQRS,T,UV,WXY,Z'declare @pos intdeclare @piece varchar(20)declare @swhere varchar(4000)-- Need to tack a delimiter onto the end of the input string if one doesn't existif right(rtrim(@string),1) <> ',' set @string = @string + ','set @pos = patindex('%,%' , @string)while @pos <> 0 begin set @piece = left(@string, @pos - 1) set @swhere = @swhere + ' ' + @piece set @string = stuff(@string, 1, @pos, '') set @pos = patindex('%,%' , @string)endprint (@swhere)I can't figure out why @swhere is emptyjean-lucwww.corobori.com