Thx! Your suggestion worked. It's PostgreSQL syntax. And yes, there are some other array operators i am missing: http://www.postgresql.org/docs/9.0/static/functions-array.html In particular the contains operator.
Regards, Michael On 12 Dez., 17:06, Lukas Eder <[email protected]> wrote: > > select * from t where 3=any(a); > > That's an interesting syntax. What database is this? I'll add this > syntax as a feature request:https://sourceforge.net/apps/trac/jooq/ticket/993 > > Right now, I'd think you'd have to re-write your SQL to something like this: > > ------- SQL ------- > select * from t where 3 = any (select * from unnest(a)) > > ------- jOOQ ------- > create.select().from(T).where(val(3).equalAny(select().from(unnest(T.A)))); > > Can you get this working? Tell me if you're missing other array operators > > Cheers > Lukas > > 2011/12/12 Michael <[email protected]>: > > > > > > > > > I have a simple SQL query: > > > select * from t where 3=any(a); > > > where t.a ist an array of int. > > How can I write this query in JOOQ?
