You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Emiliano Armellin <ea...@ateikon.com> on 2007/05/09 11:53:44 UTC
Abator select by example with the Java2 or Java5 Generator Set
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 <http://www.ateikon.com>
*
@_
earmellin@ateikon.com <ma...@ateikon.com>
*
T_
*+39 0422 452101*
Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=15653&t=86>
Get Thunderbird <http://www.mozilla.org/products/thunderbird/>
Re: Abator select by example with the Java2 or Java5 Generator Set
Posted by Jeff Butler <je...@gmail.com>.
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 <ea...@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/>
>