I\'m tryin to use SQL to build a comma separated list of cat_id\'s
the code is:
declare @output varchar(max)
set @output = null;
select @
Not sure if this applies exactly to what you're looking for, but I found this right at the same time I found your questions. I use the second solution with FOR XML PATH, which Matt Hamilton mentioned above. It's worked great for me.
Concatenating Rows - By Carl P. Anderson, 2009/10/14
http://www.sqlservercentral.com/articles/T-SQL/67973/