SELECT NAME FROM T_SYS_ORG WHERE ID IN (SELECT DISTINCT REGEXP_SUBSTR(DEPT,'[^,]+',1,LEVEL) AS ddd FROM T_INTL_WRK_ARRANGE WHERE WRK_NAME='测试' CONNECT BY LEVEL<=LENGTH(DEPT)-LENGTH(REGEXP_REPLACE(DEPT,',',''))+1)
SELECT LISTAGG(NAME,',') WITHIN GROUP(ORDER BY ID) from t_sys_org where id in (SELECT DISTINCT REGEXP_SUBSTR(DEPT,'[^,]+',1,LEVEL) AS ddd FROM T_INTL_WRK_ARRANGE WHERE WRK_NAME='测试' CONNECT BY LEVEL<=LENGTH(DEPT)-LENGTH(REGEXP_REPLACE(DEPT,',',''))+1);