Building a comma separated list?

前端 未结 9 1482
说谎
说谎 2020-11-30 08:49

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 @         


        
9条回答
  •  时光说笑
    2020-11-30 09:18

    Did you initialize @output to an empty string? COALESCE will only work if it's a NULL string.

提交回复
热议问题