db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Villacorta <pvillaco...@exist.com>
Subject SQL Exception: The length resulting from CONCAT operation is greater than 32700.
Date Wed, 28 Jun 2006 09:42:05 GMT
Hi,

I'm trying to convert an HSQL script into a Derby SQL script. I have an 
SQL INSERT statement wherein one of the values inserted is around 
200,000 characters long (String inserted into a CLOB). I read from 
http://db.apache.org/derby/docs/dev/ref/rrefstringlimits.html that a 
character constant cannot be more than 32,672 characters long. A 
concatenated character String meanwhile has a limit of 2,147,483,647. So 
what I did was divide the string into chunks of around 30,000 characters 
then use concat "||" to combine them. When I run the script through a 
Java program, the error "SQL Exception: The length resulting from CONCAT 
operation is greater than 32700." occurs. I did this procedure with 
several other long SQL statements in the script (the longest at around 
66,000 characters) and they run without errors. Is my understanding of 
char limits correct? How can I make large SQL statements like this work? 
I'm using derby-10.1.1.0.jar.

Thanks in advance,
Patrick

Mime
View raw message