0

For my application, I wanted to implement the Upload and Download feature, so I have implemented the upload feature. The uploaded document (pdf) should be visible on the user's task details page. I have made a classic report to fetch the document.

I am using this query to display the data:

select
t1.req_id,
dbms_lob.substr(t2.attachment, 2000, 1) as attachment,
sys.dbms_lob.getlength(t2.attachment) as download
from
pack_details_upload t2, emp_sim_roaming t1

so I get three plain text columns and the data is shown like this:

enter image description here

But I want a download link for the file so I modified the Download column to the type ‘Download BLOB’ and filled in the required fields like this

enter image description here

but now it shows error:

enter image description here

Any way to correct this? Thanks

1 Answer 1

0

Alright i figured out that the query I am also required to import file_id from t2. So it should be:

select
t1.req_id,
dbms_lob.substr(t2.attachment, 2000, 1) as attachment,
sys.dbms_lob.getlength(t2.attachment) as download,
t2.file_id
from
pack_details_upload t2, emp_sim_roaming t1

Not the answer you're looking for? Browse other questions tagged or ask your own question.