plsql 行转列 多行逗号合并一行

时间:2024-03-14 19:04:06

SELECT bkz999,substr( LISTAGG(ake001, ',') WITHIN GROUP(ORDER BY bkz999), 1,2000) as ake001s
     FROM kz01_data_rela where bkz999='751AE410A0857D98E050A8C0F3075923' GROUP BY bkz999;

 

 

 SELECT bkz999,--to_clob(
     --LISTAGG(ake001, ',') WITHIN GROUP(ORDER BY bkz999)
     wm_concat(ake001)
    -- ) as ake001s
     FROM kz01_data_rela where bkz999='751AE410A0857D98E050A8C0F3075923' GROUP BY bkz999;

 

plsql 行转列 多行逗号合并一行