Home » SQL & PL/SQL » SQL & PL/SQL » Appending blobs
Appending blobs [message #221108] Fri, 23 February 2007 22:25 Go to next message
kiran_jha
Messages: 2
Registered: February 2007
Location: NY
Junior Member
I am trying to append multiple pdf files(blobs) based on a query to a final blob. basically, concatenating the pdf files to one big pdf file using dbms_jobs.append procedure. The problem is that I am not sure if the append operatation is working or not as I do not see any error. However, I notice the final destination filesize increasing but when I open the pdf - shows only the last file that was appended. It is missing all the other files. Can you please advice what i am missing.
Here's my psuedo/code.................................
src_table(id integer, type varchar2(20), report blob);
dest_table (id integer, final_report blob);

declare
l_dest_report blob;
begin
insert into dest_table values (1,empty_blob()) returning final_report into l_dest_report;
for rec in (select report from src_table where type = 'A') loop
dbms_lob.append(l_dest_report, rec.report);
end loop;

end;

Thank you.
Re: Appending blobs [message #221118 is a reply to message #221108] Sat, 24 February 2007 00:13 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Are you sure you can just append multiple pdf's into a new pdf file?
I mean, I think this is not necessarily an Oracle thing..
Re: Appending blobs [message #221120 is a reply to message #221108] Sat, 24 February 2007 00:37 Go to previous message
kiran_jha
Messages: 2
Registered: February 2007
Location: NY
Junior Member
I am currently appending files in java with blob streams. But i want to see if i can use dbms_lob api to do it in plsql to reduce the db calls. The strange thing is that it appears to be functioning fine in plsql. I am able to see the binary contents of the 'merged files'. However, when I open the merged file, it is always showing the last file that was appended. Please help.
Previous Topic: HR Schema
Next Topic: Interesting unicode problem
Goto Forum:
  


Current Time: Wed Dec 07 14:39:34 CST 2016

Total time taken to generate the page: 0.25263 seconds