我有一个表job,记录有上万条,其中有一个字段jobnmae内容如下:
taobao_to_file_customer_relative
taobao_to_file_customer_info
taobao_to_file_erate_info
ebank_to_file_pay_bnkno_main
ebank_to_file_bus_rcv
jd_to_file_cust_info
jd_to_file_cust_account_p
jd_to_file_pay_detail_his
qq_to_file_cust_info
qq_to_file_bus_detail
......
......
前面taobao_to_file ebank_to_file jd_to_file qq_to_file等是数据来源,我想用REGEXP_SUBSTR接合正则表达式将后面的数据表名提取出来,请问
REGEXP_SUBSTR的表达式应该怎么写?
------解决方案--------------------
用不着正则表达式
select substr(jobname,instr(jobname,'_to_file_')+9) from job
------解决方案--------------------
regexp_replace(s.bat_job_name, ‘^.*to_file_(.*)$','\1')