ORACLE,使用regexp_substr截取字符。我需要在一个单元格里截取用回车符隔开的字符,然后分开多行显示。

2025-05-20 00:37:43
推荐回答(1个)
回答(1):

replace(sch_group,char(10),'$') --换成业务中没有的符号
select regexp_substr(replace(sch_group,chr(10),'$'), '[^$]+', 1, level) col
from dual
connect by level <= regexp_count(replace(sch_group,chr(10),'$'), '$') + 1