Re: Cannot use column alias in HAVING clause

2010-09-10 Thread Chris Wilson
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 alia

Re: Cannot use column alias in HAVING clause

2010-09-10 Thread Bryan Pendleton
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 fo

Cannot use column alias in HAVING clause

2010-09-10 Thread Chris Wilson
Hi all, I'd like to be able to use a column alias (from the column list of the SELECT statement) in the HAVING clause. When I try, I get the following error: ij> select 0 as foo from rita.request having foo; ERROR 42X04: Column 'FOO' is either not in any table in the FROM list or appears wi