db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wilson <ch...@aptivate.org>
Subject Re: Cannot use column alias in HAVING clause
Date Fri, 10 Sep 2010 15:06:47 GMT
Hi Bryan,

On Fri, 10 Sep 2010, Bryan Pendleton wrote:
> On 09/10/2010 02:48 AM, Chris Wilson wrote:
> > I'd like to be able to use a column alias (from the column list of the
> > SELECT statement) in the HAVING clause.
> ...
> > Derby clearly knows this, as using the expression instead of the alias
> > works:
> After fairly extensive discussion (see this issue for a good overview:
> https://issues.apache.org/jira/browse/DERBY-2457), the community decided,
> I believe, that this was correct behavior according to the SQL standard.

Thanks for pointing me to that issue. I would not have guessed that it had 
already been discussed in such detail :)

I would try to argue the case, but I guess I'd have to take it up with the 
SQL Standards group, and that might take a few years :)

Cheers, Chris.
Aptivate | http://www.aptivate.org | Phone: +44 1223 760887
The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.

View raw message