如何将字符串利用正则表达式转换为列值

select
null as MARK_ID,
t2.table_name as TABLE_NAME,
remark.field as FIELD_NAME,
1 as MARK_TYPE,
t2.table_name as CLASS_NAME,
123 as CLASS_ID,
'重要数据缺失' as REMARK1,
null as REMARK2,
null as STATE,
null as CREATOR,
null as CREATE_TIME,
null as INVALID_PERSON,
null as INVALID_TIME,
null as LAST_MODIFY_PERSON,
null as LAST_MODIFY_TIME,
t2.field_show_name||'缺失' as REMARK,
null as OPERATE_TYPE
from (with Field as (select 'FLOORCOUNT/BLDONFLOCOUNT/BLDUNDFLOCOUNT/ROOMCOUNT/BLDFINISHDATE/BLDSTATE/BLDDESC/PROSTATE/' Field from dual)
select regexp_substr(Field,'[^/]+',1,rownum) Field from Field
connect by rownum<=length(regexp_replace(Field,'[^/]+'))) remark
left join sys_enumeration t2 on t2.field_name=remark.Field
where t2.table_name='BUILDING';

--select * from sys_marks t;

原文地址:https://www.cnblogs.com/jxgzCHforever/p/8044523.html