Convert clob to blob
171853Jan 17 2002 — edited Aug 25 2003Anyone know an easy way to convert clob data to blob data?
We upgraded a client to 8.1.7.2 and now we can no longer store MS-Word templates to the RDBMS.
I deduce this is because MS-Word templates are binary files.
Earlier versions of 8.1.7 and 8.1.6 allowed us to do this. However, this is no longer the case.
Some of my clob rows are over 6 meg.
I have written some PL/SQL code to basically retrieve the clob data in cursor, loops through the clob in 32767 blocks,
performing dbms_lob.substr, converts that data to hex(major pain), & then write the blocks using dbmbs_lob.write.
I keep getting the proverbial "ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275".
Does anyone see flaws in my approach and might have an easier solution?
Thanks!