ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Abator select by example with the Java2 or Java5 Generator Set
Date Wed, 09 May 2007 12:01:11 GMT
You can't do it directly like that, but if I remember my boolean algebra
correctly this is equvalent:

where (field1 <> ? and field2 is not null)
  or (field1 <> ? and field3 is not null)
  or (field1 <> ? and field4 is not null)

This can be done with Abator.

Jeff Butler



On 5/9/07, Emiliano Armellin <earmellin@ateikon.com> wrote:
>
> Hello,
>
> how can I create a select like this with the example class (java 2 or java
> 5 generator set)?
>
> select *
> from table
> where field1 <> ?
> and (field2 is not null or field3 is not null or field4 is not null)
>
> I'm unable to group the 3 *or* clause under 1 *and *clause, is it
> possible?
>
>
> thanks for the help
>
>
> --
> Emiliano Armellin
>
>    - W_
>    www.ateikon.com
>    - @_
>    earmellin@ateikon.com
>    - T_
>    *+39 0422 452101*
>
> [image: Get Firefox!]<http://www.spreadfirefox.com/?q=affiliates&id=15653&t=86>
> [image: Get Thunderbird] <http://www.mozilla.org/products/thunderbird/>
>

Mime
View raw message