Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Updating BLOB column

709491Nov 17 2009 — edited Nov 17 2009
Dear all,
I have made a database procedure for inserting BLOB to database, using this code
-----
INSERT INTO CUST_SIGNATURE
(CUSTOMERID, SIG_NAME, MIME_TYPE, SIG_IMG)
VALUES
(p_custid, v_image_name, v_mime_type, empty_blob()) RETURN sig_img INTO b_lob;

f_lob := BFILENAME('SIG_SOURCE_DIR', p_filename);

dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);

dbms_lob.loadfromfile(b_lob, f_lob, dbms_lob.getlength(f_lob));
dbms_lob.fileclose(f_lob);
COMMIT;
-----

Now i need to update the blob column with a new image.
The primary key for the table is combination of (CUSTOMERID, SIG_NAME).

I need to update the image for the selected (CUSTOMERID, SIG_NAME)

I searched in net. But couldnt get a proper answer.
Need something like this
-----
upate CUST_SIGNATURE
set SIG_IMG = to a blob
where customerid=p_custid, and sig_name= p_filename;
-----
Thanks in advance

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 15 2009
Added on Nov 17 2009
3 comments
494 views