Home » SQL & PL/SQL » SQL & PL/SQL » Update BLOB in procedure (BLOB coming as INPUT to procedure) (Oracle 10g, RHEL 4)
Update BLOB in procedure (BLOB coming as INPUT to procedure) [message #418909] Wed, 19 August 2009 02:30 Go to next message
srikanth2384
Messages: 4
Registered: December 2008
Location: Pune
Junior Member

Hi All,

Following is requirement:

I am getting BLOB value as INPUT to the procedure which i have to update to a table with respect to the primary key which i get as INPUT to procedure as well.

Currently i am doing the following:

UPDATE TABLE_NAME
SET BOLB_ColName = EMPTY_BLOB()
WHERE
<Condition>;

SELECT BOLB_ColName
INTO IO_BLOB_VALUE (Input to the Procedure)
FROM TABLE_NAME
WHERE <Condition>
FOR UPDATE;


With the above steps the getting my BLOB value updated, but as 0 bytes.

How can i do the same using DBMS_LOB ?
Can someone let me know the right approach ?

Thanks,
Srikanth
Re: Update BLOB in procedure (BLOB coming as INPUT to procedure) [message #418913 is a reply to message #418909] Wed, 19 August 2009 02:55 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
How can i do the same using DBMS_LOB ?

What do you want to get? An empty BLOB? There is no function in dbms_lob for this, the function is empty_blob as you use it.

Regards
Michel
Re: Update BLOB in procedure (BLOB coming as INPUT to procedure) [message #418923 is a reply to message #418909] Wed, 19 August 2009 03:43 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
From the code that you've posted (and please use [CODE} tags in future) it seems that you are only ever updating your table with empty_blob() and not with the blob that you want to store in the table.
Previous Topic: SQL query with parallel hint running very slow
Next Topic: RECURSION IN PL SQL
Goto Forum:
  


Current Time: Tue Dec 06 12:30:51 CST 2016

Total time taken to generate the page: 0.12743 seconds