Closed GoogleCodeExporter closed 9 years ago
temporary work around would be to use
select MAX(id) as max_id from TEST;
Original comment by smith7...@gmail.com
on 27 Jun 2011 at 1:30
I think another occurrence of this issue is shown by this:
jdbc:h2:mem:;DATABASE_TO_UPPER=FALSE
drop table test if exists;
create table test( a int, b varchar(255) );
insert into test (a, b) values (1, 'foo' );
insert into test (a, b) values (2, 'bar' );
select SUM(a), b as c from test group by c;
which fails with
Column "c" not found; SQL statement:
select SUM(a), b as c from test group by c [42122-157] 42S22/42122
i.e. the column alias is not recognized when checking against the group by list.
Original comment by bentm...@sonatype.com
on 30 Jun 2011 at 12:18
Original comment by thomas.t...@gmail.com
on 10 Jul 2011 at 12:44
"select max(id) as max_id from ..." now works in H2 version 1.3.158.
"select b as c from test group by c" doesn't work yet.
Original comment by thomas.t...@gmail.com
on 17 Jul 2011 at 12:14
Fixed in version 1.3.162
Original comment by thomas.t...@gmail.com
on 26 Nov 2011 at 12:55
Original issue reported on code.google.com by
smith7...@gmail.com
on 27 Jun 2011 at 1:25