declare @output varchar(8000)
select @output=coalesce(@output,'')+ Convert(varchar(50),CityId)+','
from AreMSCrm_ChannelDistributionByCity_Temp
select @output=substring(@output,1,len(@output)-1)
print @output
declare @output varchar(8000)
select @output=coalesce(@output,'')+ Convert(varchar(50),CityId)+','
from AreMSCrm_ChannelDistributionByCity_Temp
select @output=substring(@output,1,len(@output)-1)
print @output