原格式
转换后格式
适用于3,4这样逗号分隔的数字组成的字符串类型
转换成3和4两行
sql:
SELECT REGEXP_SUBSTR(guarantee_method, '[^,]+', 1, LEVEL) guarantee_method
FROM afd_case
where case_id = 5732
CONNECT BY LEVEL <= REGEXP_COUNT(guarantee_method, '[^,]+')
AND ROWID = PRIOR ROWID
AND PRIOR DBMS_RANDOM.VALUE IS NOT NULL
ORDER BY guarantee_method
--guarantee_method varchar2 3,4
标签:多行,LEVEL,行转,字符串,Oracle,method,guarantee
From: https://www.cnblogs.com/tenghao/p/17072114.html