BI Publisher (MOSC)

MOSC Banner

BI publisher - displaying BLOB fields

edited Sep 13, 2014 5:01AM in BI Publisher (MOSC) 3 commentsAnswered

I am using BI publisher 11.1.1.7.  I have a DB table with 100 records. One of the columns is a BLOB. The BLOB contains PDF files.

I populated this BLOB via an anonymous PLSQL block like so:

declare l_size      number; l_file_ptr  bfile; l_blob      blob; begin l_file_ptr := bfilename('SECFILE', 'contract.pdf'); dbms_lob.fileopen(l_file_ptr); l_size := dbms_lob.getlength(l_file_ptr); for ctr in 1 .. 100 loop insert into contracts_sec ( contract_id, contract_name, file_size, orig_file ) values ( ctr, 'Contract '||ctr, null, empty_blob() ) returning orig_file into l_blob; dbms_lob.loadfromfile(l_blob, l_file_ptr, l_size); end loop; commit; dbms_lob.close(l_file_ptr); end; / 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center