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 @
Did you initialize @output to an empty string? COALESCE will only work if it's a NULL string.