Hello,

Your best starting point for SQL functions in jOOQ is org.jooq.impl.DSL:
http://www.jooq.org/javadoc/latest/org/jooq/impl/DSL.html

In there, you'll find both functions needed for your query:
- 
http://www.jooq.org/javadoc/latest/org/jooq/impl/DSL.html#nullif(org.jooq.Field,
T)
-
http://www.jooq.org/javadoc/latest/org/jooq/impl/DSL.html#max(org.jooq.Field)

So your query will look similar to this:

// The below code assumes a static import as such:
// import static org.jooq.impl.DSL.*;

DSL.using(connection, dialect)
   .select(nullIf(max(a), 0).as("a"))
   .from(table)

Replace a and table by the actual values.

Lukas


2013/8/2 Вячеслав Бойко <[email protected]>

> Please, help me to understand.
>
> I need to make a query like this one:
>
> SELECT NULLIF(MAX(a),0) AS a FROM table
>
> In what code will this query must be implemented with jOOQ?
>
> --
> 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/groups/opt_out.
>
>
>

-- 
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/groups/opt_out.


Reply via email to