db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Insert large using SQL
Date Tue, 26 Sep 2006 07:19:08 GMT
Radek Terber <lst.ara@post.cz> writes:

> I need insert large text (over 100 KB) into column type CLOB (created
> as max. available size - cca 2GB) using SQL command, but derby (latest
> release) inserts only cca 32 KB. If text is larger, derby throws SQL
> exception with description 'A string constant starting with ''inserted
> text ... &' is too long'.

I think this works (|| is the concatenation operator):

  insert into t values
      cast ('a long string, but not more than 32K ....' as clob) ||
      cast ('next part... keep this one smaller than 32K too ....' as clob)

At least, I managed to insert a 33K clob this way.

Knut Anders

View raw message