Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 8908 invoked from network); 16 Sep 2006 02:15:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Sep 2006 02:15:58 -0000 Received: (qmail 25961 invoked by uid 500); 16 Sep 2006 02:15:57 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 25917 invoked by uid 500); 16 Sep 2006 02:15:57 -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 25902 invoked by uid 99); 16 Sep 2006 02:15:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 19:15:57 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Sep 2006 19:15:54 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 112BA714356 for ; Sat, 16 Sep 2006 02:10:26 +0000 (GMT) Message-ID: <24144114.1158372626068.JavaMail.jira@brutus> Date: Fri, 15 Sep 2006 19:10:26 -0700 (PDT) From: "Bryan Pendleton (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Assigned: (DERBY-147) ERROR 42X79 not consistant ? - same column name specified twice In-Reply-To: <1599192524.1108503225502.JavaMail.root@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 [ http://issues.apache.org/jira/browse/DERBY-147?page=all ] Bryan Pendleton reassigned DERBY-147: ------------------------------------- Assignee: Bryan Pendleton > ERROR 42X79 not consistant ? - same column name specified twice > --------------------------------------------------------------- > > Key: DERBY-147 > URL: http://issues.apache.org/jira/browse/DERBY-147 > Project: Derby > Issue Type: Bug > Components: SQL > Reporter: Bernd Ruehlicke > Assigned To: Bryan Pendleton > Attachments: derby-147-10.0.2.1.diff, derby-147.diff > > > This happens from JDBC or ij. Here the output form ij> > ij version 10.0 > CONNECTION0* - jdbc:derby:phsDB > * = current connection > ij> select a1.XXX_foreign, a1.native, a1.kind, a1.XXX_foreign FROM slg_name_lookup a1 ORDER BY a1.XXX_foreign; > ERROR 42X79: Column name 'XXX_FOREIGN' appears more than once in the result of the query expression. > But when removing the ORDER BY and keeping the 2 same column names it works > ij> select a1.XXX_foreign, a1.native, a1.kind, a1.XXX_foreign FROM slg_name_lookup a1; > XXX_FOREIGN |NATIVE |KIND |XXX_FOREIGN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 0 rows selected > ij> > So - it seams to be OK to specify the same column twice - as long as you do not add the ORDER BY clause. > I woul dof course like that the system allows this - but at leats it should be consistant and either allow both or none of the two queries above. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira