Skip to Main Content

Java Database Connectivity (JDBC)

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 concatinate two clob objects using JDBC...good brain excercise!!!

843854Mar 3 2003 — edited Mar 9 2003
Hi,
I am using MYSQL server ver. 4.0 and J/Connector version 3.0.6
I have two columns of LONGTEXT type and i have to concatenate them and store it in a third column.I have thought of the following strategy:
1. Retrieve the columns as CLOB using getClob()
2.Concatinate the CLOB values and then insert it in the corr. database column.

My problem is this that i don't know what strategy should i use to concatenate the two values in the clob objects without bringing the whole clob values in the memeory.If i use this strategy..it gives me outofmemory error.
My Clob columns may go upto 10MB in size.

Pl. help.....Any suggestions from the whizkids out there will be extremely appreciated!!!
Thanks....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 6 2003
Added on Mar 3 2003
23 comments
248 views