ORACLE 一条记录 某字段值以';'拆分为多条记录
作者:互联网
SELECT ID,班组,班次日期, REGEXP_SUBSTR(TIME_RANGE, '[^;]+', 1, LEVEL) TIME_RANGE
FROM 排班表
WHERE 1 = 1
CONNECT BY LEVEL <= REGEXP_COUNT(TIME_RANGE, ';') + 1
AND PRIOR ROWID = ROWID
AND PRIOR DBMS_RANDOM.VALUE IS NOT NULL
AND REGEXP_SUBSTR(TIME_RANGE, '[^;]+', 1, LEVEL) IS NOT NULL
标签:段值,某字,LEVEL,记录,SUBSTR,RANGE,TIME,REGEXP,NULL 来源: https://www.cnblogs.com/xuliming/p/12750506.html