data to copy from clob to blob column
I am tring to copy data from clob col. to blob col. the code for that is written as below.
v_blob blob := empty_blob();
cursor c1 is select address ,add2, rowid from xyz for update;
for i in c1
select add2 into v_blob from xyz where rowid = i.rowid;
a := dbms_lob.getlength(i.address);
DBMS_LOB.READ ( i.address, a, 1, buffer);
buffer2 := utl_raw.cast_to_raw(buffer);
DBMS_LOB.WRITE(v_blob, utl_raw.length(buffer2), 1, buffer2);
update xyz set add2 = v_blob where rowid=i.rowid;
But getting folloing errors
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified:
ORA-06512: at "SYS.DBMS_LOB", line 767
ORA-06512: at line 16
What is error cause.
the above metioned has been done as I haven't intilized the blob col . I intilized it as update table_name set col_name = empty_blob();
But the same code giving same error in Linux where in Windows it is running fine.
Just to clear At windows we hv Oracle 22.214.171.124 and on Linux we have Oracle 126.96.36.199
Click Here to Expand Forum to Full Width