Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 31501 invoked from network); 3 Nov 2009 11:45:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Nov 2009 11:45:27 -0000 Received: (qmail 10737 invoked by uid 500); 3 Nov 2009 11:45:27 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 10679 invoked by uid 500); 3 Nov 2009 11:45:26 -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 10671 invoked by uid 99); 3 Nov 2009 11:45:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 11:45:26 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI 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:45:24 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7CC35234C4AA for ; Tue, 3 Nov 2009 03:45:03 -0800 (PST) Message-ID: <138733348.1257248703509.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 11:45:03 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-4433) Cannot insert from EXCEPT/INTERSECT when target table has more columns than the source MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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.