Oracle列转行函数LISTAGG()

Oracle 列转行

image

转为

image

SELECT aac002,aac003,aaa001,bbb001,cf_type,bd_type, LISTAGG(aae003, ',') WITHIN GROUP (ORDER BY aac002) AS aae003 
FROM   Data_dycflq_2021 
GROUP BY aac002,aac003,aaa001,bbb001,cf_type,bd_type

LISTAGG()函数

posted @ 2021-07-26 09:21  欢天喜地夏小正  阅读(73)  评论(0)    收藏  举报