Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: problem insert on clob field
Bruintje Beer wrote:
> I have a problem inserting a clob field in a database table. My table
> create table T1(id int, xmlmsg clob);
> when I do an insert on this table with a big xmlmsg i get an error that he
> string literal is too long.
>
> insert into T1(id, xmlmsg) values(1, 'her comes a very big xml string');
Instead of a huge string literal, you can use SQL*Loader:
This works for me. Your milesage may vary. Note that it may be better or worse that your XML files are separated out. Also note that single quotes would have to be escaped (doubled) using literals whereas w/ this they do not.
If you are always adding (not updating), you can just allow the "filename" column to live permanently in T1, then you dont' nee the temp table. But make sure to change "truncate" to "append" in the control file.
Hope that helps.
John Hinsdale Received on Tue Jan 16 2007 - 12:04:34 CST
![]() |
![]() |