oracle 正则表达式 替换 ‘’:
select/*+parallel(8)*/
t.nameas报表名称,
t4.umidas上报人UM,
t4.created_dateas上报时间,
t4.updated_date,
t4.state,
t4.eoa_session_id,
t3.base_path,
t6.deptid_descr,
dbms_lob.substr(
REGEXP_REPLACE(replace(substr(t4.query_condition,
instr(t4.query_condition,'collspanpoint=')+14,
instr(t4.query_condition,
'}',
instr(t4.query_condition,
'collspanpoint='))-
instr(t4.query_condition,'collspanpoint=')-13),
'''',
''),
'[[:alpha:]]+\:',
'')
)
--dbms_lob.substr(substr(t4.query_condition,instr(t4.query_condition,'collspanpoint=')+14,instr(t4.query_condition,'}',instr(t4.query_condition,'collspanpoint='))-instr(t4.query_condition,'collspanpoint=')-13))
fromparp_report_infot,
parp_report_modulet3,
parp_report_eoa_session_detailt4,
(selecta.login_username,a.dept_code
From(select/*+parallel(8)*/
l.login_username,
l.dept_code,
row_number()over(partitionbyl.login_usernameorderbyl.created_datedesc)asordernum
Fromparp_user_login_logl
wherel.dept_codeisnotnull)a
wherea.ordernum=1)t5,
parp_paic_dept_infot6
wheret.id_report_info=t4.id_report_info(+)
andt.id_report_module=t3.id_report_module(+)
andt4.umid=t5.login_username
andt5.dept_code=t6.paic_unique_deptid
and(t3.base_pathlike'寿险数据采集%'ort3.base_pathlike'金管家数据采集%'or
t3.base_pathlike'行销数据采集%')
andto_char(t4.created_date,'yyyy-MM-dd')>='2017-07-01'
andto_char(t4.created_date,'yyyy-MM-dd')<='2018-06-30'
andt4.state='Y'
orderbyt4.created_datedesc