Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Updating a CLOB

Updating a CLOB

From: Sfole <tribet_at_virgilio.it>
Date: 26 Oct 2004 00:46:52 -0700
Message-ID: <1b2ba04e.0410252346.84ac12b@posting.google.com>


Hi, I need help in updating a clob...What I do is to insert a record like below, then I need to update the record with a new file1.txt but I don't succeed in updating the record...can someone help me please?



CREATE OR REPLACE DIRECTORY DOCUMENTS AS '&nome_dir';

DECLARE

v_bfile BFILE;
v_clob CLOB;
v_file_name VARCHAR2(1000) := 'File1.txt';

BEGIN
INSERT INTO table1(a1,b1,c1,d1)
VALUES(1,2,empty_clob(),3)
RETURNING c1 INTO v_clob;

v_bfile := BFILENAME('DOCUMENTS', v_file_name);

Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
Dbms_Lob.Loadfromfile(v_clob, v_bfile,Dbms_Lob.Getlength(v_bfile));
Dbms_Lob.Fileclose(v_bfile);

END;
/
DROP DIRECTORY DOCUMENTS;

THX
Sfole Received on Tue Oct 26 2004 - 02:46:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US