Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 32142 invoked from network); 3 Nov 2009 11:47:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Nov 2009 11:47:28 -0000 Received: (qmail 12144 invoked by uid 500); 3 Nov 2009 11:47:28 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 12087 invoked by uid 500); 3 Nov 2009 11:47:28 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 12079 invoked by uid 99); 3 Nov 2009 11:47:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 11:47:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 11:47:26 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1080D234C052 for ; Tue, 3 Nov 2009 03:47:05 -0800 (PST) Message-ID: <140344486.1257248825062.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 11:47:05 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4433) Cannot insert from EXCEPT/INTERSECT when target table has more columns than the source In-Reply-To: <138733348.1257248703509.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773025#action_12773025 ] Knut Anders Hatlen commented on DERBY-4433: ------------------------------------------- This bug is only seen on branches where DERBY-4420 has been fixed. On branches without the fix for DERBY-4420, a NullPointerException is seen instead. > Cannot insert from EXCEPT/INTERSECT when target table has more columns than the source > -------------------------------------------------------------------------------------- > > Key: DERBY-4433 > URL: https://issues.apache.org/jira/browse/DERBY-4433 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.6.0.0 > Reporter: Knut Anders Hatlen > > If an INSERT statement takes the rows to insert from an EXCEPT query or an INTERSECT query, the statement fails with "Column position 'X' out of range" if the target table contains more columns than the result returned from EXCEPT or INTERSECT. > Example: > ij> create table t (x int, y int); > 0 rows inserted/updated/deleted > ij> insert into t(x) select x from t except select x from t; > ERROR 42X77: Column position '2' is out of range for the query expression. > ij> insert into t(x) select x from t intersect select x from t; > ERROR 42X77: Column position '2' is out of range for the query expression. > The corresponding UNION query works: > ij> insert into t(x) select x from t union select x from t; > 0 rows inserted/updated/deleted -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.