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!

How to make an insert script for CLOB data types?

361137Jul 28 2011 — edited Jul 28 2011
I need to have an insert script for Oracle 11g where I insert large texts into a CLOB field

I exported data from a source table using TOAD's export dataset and the insert statements option, so it generates a script of just simple insert into statements with the clob strings in the values clause within single quotes.

While most of the inserts succeed, several fail with the error: string literal too long

How can I insert long texts into clobs?

One workaround I was considering, is maybe breaking up those inserts which are too big, so that it inserts a chunk, and then does an update to append additional chunks? not sure if that would work either

first wanted to get any ideas from the oracle experts here in case there is a much easier, non-manual labor intensive way.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2011
Added on Jul 28 2011
2 comments
4,159 views