Building a comma separated list?

前端 未结 9 1492
说谎
说谎 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:24

    On Unix, the sqlminus command lets you merge SQL commands and other formatting:

    % sqlminus "select ri || ',' ||name|| ',' || numports || ',' || ascii(OVRONSET) from sdfctigw.ivrgrp where GRP_BEP is not null;" | sort -h
    1,COMO INTERNAL 2,700,90
    7,LOADIVR,10,80
    10,SPEECH_IVR_PROD,600,95
    

提交回复
热议问题