Oracle 读取blob rtf文件,看到个有趣的方法批量下载rtf模板

Hi,

Blob column ‘template file data‘ below is just what you want, open it in PLSQL-DEVELOPER and save it as a rtf file or you can write programs that work with ‘BLOB‘ objects to export them.

select fa.application_name concurrent_program_appl_name

,fcp.user_concurrent_program_name

,fcp.concurrent_program_name

,(select decode(fe.execution_method_code

,'K'

,fl.meaning

,'P'

,fl.meaning || ' : ' || '$' || fa.basepath ||

'/reports/US/' || fe.execution_file_name || '.rdf')

from fnd_application fa

where fa.application_id = fe.application_id) execution_method

,xdd.data_source_name

,xdd.data_source_code

,xl_xdd.file_name data_source_file_name

,xl_xdd.file_data data_source_file_data

,xt.template_name

,xt.template_code

,xl_xt.file_name template_file_name

,xl_xt.file_data template_file_data

from fnd_concurrent_programs_vl fcp

,fnd_application_vl fa

,fnd_executables_vl fe

,fnd_lookups fl

,fnd_application fa2

,xdo_ds_definitions_vl xdd

,xdo.xdo_lobs xl_xdd

,xdo_templates_vl xt

,xdo.xdo_lobs xl_xt

where fcp.application_id = fa.application_id

and fcp.executable_application_id = fe.application_id

and fcp.executable_id = fe.executable_id

and fe.execution_method_code = fl.lookup_code

and fl.lookup_type = 'CP_EXECUTION_METHOD_CODE'

and fcp.output_file_type = 'XML'

and fcp.application_id = fa2.application_id

and fa.application_short_name = xdd.application_short_name

and fcp.concurrent_program_name = xdd.data_source_code

and xdd.application_short_name = xl_xdd.application_short_name(+)

and xdd.data_source_code = xl_xdd.lob_code(+)

and trunc(sysdate) between trunc(nvl(xdd.start_date

,sysdate)) and

trunc(nvl(xdd.end_date

,sysdate))

and xl_xdd.xdo_file_type(+) = 'XML-DATA-TEMPLATE'

and xdd.application_short_name = xt.ds_app_short_name

and xdd.data_source_code = xt.data_source_code

and xt.application_short_name = xl_xt.application_short_name(+)

and xt.template_code = xl_xt.lob_code(+)

and trunc(sysdate) between trunc(nvl(xt.start_date

,sysdate)) and

trunc(nvl(xt.end_date

,sysdate))

and xl_xt.xdo_file_type(+) = 'RTF'

and fcp.concurrent_program_name = 'XLAAARPT' --Concurrent Program Name

order by fcp.user_concurrent_program_name

,xdd.data_source_name

,xt.template_name;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值