db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-84) Column aliasing could simplify queries
Date Wed, 14 May 2008 04:25:56 GMT

     [ https://issues.apache.org/jira/browse/DERBY-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Bryan Pendleton updated DERBY-84:

    Attachment: simpleTest.diff

simpleTest.diff contains a simple addition to select.sql to
demonstrate the current (believed to be standards-compliant)
behavior of Derby with respect to column aliases in the WHERE clause.

I propose to commit this change and resolve this issue as won't-fix,
with the reasoning that we intend to preserve the standards-compliant
behavior in this area for now.

> 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:
>            Reporter: Bob Gibson
>            Assignee: Bryan Pendleton
>            Priority: Minor
>         Attachments: simpleTest.diff
> 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.

View raw message