Oracle Connect BY用法
select level from dual connect by level <=10;
上例均可查询得到1 .. N 的序列。
SELECT A.* ,REGEXP_SUBSTR(A.MATERIAL_ID,'[^,]+',1,LVL,'C') MATERIAL_NO --,REGEXP_COUNT(A.MATERIAL_ID,',')+1 CNT FROM DWT_INPUT_LOT A ,(SELECT LEVEL LVL FROM DUAL CONNECT BY LEVEL < 6)