Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert clob to blob

171853Jan 17 2002 — edited Aug 25 2003
Anyone 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!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2003
Added on Jan 17 2002
8 comments
7,205 views