Would this approach work for you?declare @tbl table (
pkey int identity(1, 1),
fruit varchar(20) not null
)
insert into @tbl(fruit)
select 'Apples' union all
select 'Bananas' union all
select 'Cherries'
select *
from @tbl
declare @csv_list varchar(max) = ''
update @tbl
set @csv_list += fruit + ','
set @csv_list = LEFT(@csv_list, len(@csv_list) - 1) -- Remove trailing comma
select @csv_list csv
It's kind of a wierd use of an UPDATE but I think it gets you what you want.
=================================================
Men shout to avoid listening to one another. -Miguel de Unamuno