Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 33073 invoked from network); 28 Jun 2006 09:42:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jun 2006 09:42:30 -0000 Received: (qmail 91756 invoked by uid 500); 28 Jun 2006 09:42:28 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 91727 invoked by uid 500); 28 Jun 2006 09:42:28 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 91715 invoked by uid 99); 28 Jun 2006 09:42:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 02:42:28 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.14.253.182] (HELO mail.exist.com) (64.14.253.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 02:42:27 -0700 Received: from [192.168.241.187] ([203.177.56.98]) (authenticated bits=0) by mail.exist.com (8.12.11/8.12.11) with ESMTP id k5S9rLNg030205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 28 Jun 2006 02:53:24 -0700 Message-ID: <44A24EED.3040902@exist.com> Date: Wed, 28 Jun 2006 17:42:05 +0800 From: Patrick Villacorta User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: derby-user@db.apache.org Subject: SQL Exception: The length resulting from CONCAT operation is greater than 32700. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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