Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 71442 invoked from network); 13 May 2008 22:38:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 May 2008 22:38:19 -0000 Received: (qmail 34401 invoked by uid 500); 13 May 2008 22:38:21 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 34369 invoked by uid 500); 13 May 2008 22:38:21 -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 34358 invoked by uid 99); 13 May 2008 22:38:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2008 15:38:21 -0700 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, 13 May 2008 22:37:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C3BF0234C118 for ; Tue, 13 May 2008 15:37:55 -0700 (PDT) Message-ID: <2069027956.1210718275800.JavaMail.jira@brutus> Date: Tue, 13 May 2008 15:37:55 -0700 (PDT) From: "Bryan Pendleton (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-84) Column aliasing could simplify queries In-Reply-To: <1859255213.1101655998759.JavaMail.apache@nagoya> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596553#action_12596553 ] Bryan Pendleton commented on DERBY-84: -------------------------------------- I intend to add a few more tests to the test suite, to demonstrate the current handling of column aliases in WHERE clauses, and then to resolve this issue as "won't fix". See the discussion in DERBY-2457 for some additional comments regarding the reasoning behind this proposal. > Column aliasing could simplify queries > -------------------------------------- > > Key: DERBY-84 > URL: https://issues.apache.org/jira/browse/DERBY-84 > Project: Derby > Issue Type: New Feature > Components: SQL > Affects Versions: 10.0.2.0 > Reporter: Bob Gibson > Assignee: Bryan Pendleton > Priority: Minor > > Currently, one can not use an alias to simplify queries. For example, being able to alias "LongDescriptiveColumnName" AS LDCN would allow one to use the alias elsewhere in the query, e.g., the WHERE clause: > SELECT LongDescriptiveColumnName AS LDCN FROM MyTable WHERE LDCN LIKE '%testing%'; > The current result is a message like: > ERROR 42X04: Column 'LDCN' is not in any table in the FROM list or it appears within a join specification and is outside the scope of the join specification or it appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'LDCN' is not a column in the target table. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.