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

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 行转列 多行逗号合并一行_第1张图片

你可能感兴趣的:(问题,笔记)