Hi everyone,

We have the following problem when rendering queries in the Oracle Dialect 
(we are using Jooq 3.2.5)
Assume we have the following table

| TABLE_X              |
|----|-----------------|
| ID | NUMBER NOT NULL |
| A  | NUMBER NOT NULL |
| B  | NUMBER          |
|----|-----------------|

We would like to build the following Query

Field<Long> field = DSL.coalesce(B, A).as("BA");
dsl.select(field)
   .from(Tables.TABLE_X)
   .groupBy(field)

In the Oracle dialect, this is rendered as follows.

select coalesce(B, A) BA
from TABLE_X
group by BA

But aliases are not available in group by expressions and therefore, we 
would like to have
the following rendering:

select coalesce(B, A) BA
from TABLE_X
group by coalesce(B, A)

Have you had the same problem? and if yes how did you solve it?
Thanks!

Cheers. stan.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to