declare @str varchar(max)
select @str=ISNULL(@str+':','')+ProductNo from (select distinct top 10 ProductNo from ProductTB)as temp
select @str
declare @str varchar(max)
select @str=ISNULL(@str+':','')+ProductNo from (select distinct top 10 ProductNo from ProductTB)as temp
select @str