Oracle regexp_substr()正则表达


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)
WHERE 1=1
AND A.PROD_TYPE IN ('Normal')
--AND A.LOT_TYPE IN ('F','S','T')
AND A.DATE_TIMEKEY = TO_CHAR(TRUNC(SYSDATE -8/24) ,'yyyymmdd')

 

regexp_substr-CSDN博客

posted @ 2023-10-16 14:25  bellin124  阅读(19)  评论(0编辑  收藏  举报