Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 92511 invoked from network); 19 Apr 2010 13:42:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Apr 2010 13:42:11 -0000 Received: (qmail 25457 invoked by uid 500); 19 Apr 2010 13:42:11 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 25425 invoked by uid 500); 19 Apr 2010 13:42:11 -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 25418 invoked by uid 99); 19 Apr 2010 13:42:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Apr 2010 13:42:11 +0000 X-ASF-Spam-Status: No, hits=-1310.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Apr 2010 13:42:10 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3JDfn7i020718 for ; Mon, 19 Apr 2010 09:41:50 -0400 (EDT) Message-ID: <24354085.11011271684509886.JavaMail.jira@thor> Date: Mon, 19 Apr 2010 09:41:49 -0400 (EDT) From: "C.S. Nirmal J. Fernando (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Assigned: (DERBY-4371) Non-selected columns for SELECT DISTINCT allowed in ORDER BY clause if ordered by expression In-Reply-To: <809488972.1252323237535.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] C.S. Nirmal J. Fernando reassigned DERBY-4371: ---------------------------------------------- Assignee: C.S. Nirmal J. Fernando > Non-selected columns for SELECT DISTINCT allowed in ORDER BY clause if ordered by expression > -------------------------------------------------------------------------------------------- > > Key: DERBY-4371 > URL: https://issues.apache.org/jira/browse/DERBY-4371 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.5.1.1 > Reporter: Bernt M. Johnsen > Assignee: C.S. Nirmal J. Fernando > Priority: Critical > > How to repeat: > ij> create table t (i integer, j integer);; > 0 rows inserted/updated/deleted > ij> insert into t values (1,2),(1,3); > 2 rows inserted/updated/deleted > ij> select distinct i from t order by j; > ERROR 42879: The ORDER BY clause may not contain column 'J', since the query specifies DISTINCT and that column does not appear in the query result. > ij> select distinct i from t order by j*2; > I > ----------- > 1 > 1 > 2 rows selected -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.