you could try
OQLQuery query = odmg.newOQLQuery();
query.create("select picks from " + Pick.class.getName() +
" where pickListId = $1 and (status = $2 or status = $3) order by nextId
asc");
query.bind(pickListId);
query.bind(new String("D"));
query.bind(new String("E"));
DList results = (DList) query.execute();
refer to...
http://db.apache.org/ojb/query.html
hth
-aukesh
On Fri, 2004-02-13 at 11:01, Craig A. Vanderborgh wrote:
> Hello Everyone:
>
> We are using OJB with great success, and I would first like to thank the
> OJB team for such a terrific product.
>
> We are using OJB rc5, and the ODMG API. I have a functioning OQL query
> that looks like this:
>
> OQLQuery query = odmg.newOQLQuery();
> query.create("select picks from " + Pick.class.getName() +
> " where pickListId = $1 and status = $2 order by nextId asc");
> query.bind(pickListId);
> query.bind(new String("D"));
> DList results = (DList) query.execute();
>
> We would like to alter this query so that instead of just
> "and status = $2"
>
> we had something like
>
> "and (status = $2 || status = $3)"
>
> The problem is that I have been unable to find any OQL documentation
> that indicates how one might do this sort of thing. We would very much
> appreciate some advice on this.
>
> If nothing else, please give us a pointer to the best OQL documentation
> you are aware of, as what we have found thus far is very limited.
>
> TIA,
> craig vanderborgh
> voxware incorporated
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]