列转行

test:

c1   c2

1    a

1     b

2     c

 

select
            to_char(wmsys.wm_concat(c2))                                   ,
            to_char(replace(wmsys.wm_concat(c2),',','/'))

     from
            test   

  group by
             c1

show case:

1     a,b   a/b

2      c       c

相同的功能函数:

 select listagg(c2,',') within group(order by c1)        from test      ;  

posted on 2016-02-04 17:34  gcczhongduan  阅读(101)  评论(0编辑  收藏  举报