0

I have a long SQL statement with multiple inner joins from multiple tables which outputs 2 Columns: BLOB and NameString. Using Oracle 11g Database.

(select blobdata, namestring from xy innerjoin...innerjoin....)-(filtered by Sysdate)

My question is, how does a procedure have to look like to save blob files named like the namestring as a jpg-file on my computer or a networkdestination. I found multiple methods like utl_file but I dont know how to arrange them to my specific problem. Iam new to pl/sql programming.

SQL DEVELOPER OUTPUT

Thank you in advance!

muka90
  • 91
  • 10
  • The general approach would be open file with UTL_FILE.fopen in wb mode, get BLOB length using DBMS_LOB.getlength loop through it and read using DBMS_LOB.Read and store with UTL_FILE.put_raw. Then close file. – J91321 Jun 21 '16 at 10:12
  • Try this, mayby it will help You: http://www.dba-oracle.com/t_writing_blob_clob_os_file.htm – Michał M Jun 21 '16 at 10:45

0 Answers0