Hello folks,

I've just analysed this jOOQ support request on Stack Overflow here and
suspect that it is really a bug in H2:
http://stackoverflow.com/q/25975401/521799

This query works in H2:

select 1 abc, count(*) from dual group by abc order by abc asc


So does this one:

select 1 "ABC", count(*) from dual group by "ABC" order by "ABC" asc


but this one doesn't:

select 1 "abc", count(*) from dual group by "abc" order by "abc" asc


I'm getting this exception:

org.jooq.exception.DataAccessException: SQL [select 1 "abc", count(*) from
dual group by "abc" order by "abc" asc]; Feld "abc" nicht gefunden
Column "abc" not found; SQL statement:
select 1 "abc", count(*) from dual group by "abc" order by "abc" asc
[42122-177]


I suspect that quotes are not properly evaluated in GROUP BY clauses, at
least when they surround an alias declared in the SELECT clause.

Cheers,
Lukas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to