Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Updating a CLOB
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?
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);