需求:按ID,把PARTICIPATORS字段里的内容按‘,’ 分开,转成行
select id,PARTICIPATORS from (with test as (select id ,PARTICIPATORS from NSC_OA_RW where PARTICIPATORS is not null ) select id,substr(t.cPARTICIPATORS,instr(t.cPARTICIPATORS, ',', 1, c.lv) + 1, instr(t.cPARTICIPATORS, ',', 1, c.lv + 1) - (instr(t.cPARTICIPATORS, ',', 1, c.lv) + 1)) AS PARTICIPATORS from (select id,',' || PARTICIPATORS || ',' AS cPARTICIPATORS,length(PARTICIPATORS || ',') - nvl(length(REPLACE(PARTICIPATORS, ',')), 0) AS cnt FROM test) t, (select LEVEL lv from dual CONNECT BY LEVEL <= 100) c where c.lv <= t.cnt )