You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Robert Bowen <sy...@yahoo.com> on 2005/01/31 10:36:13 UTC

Somewhat complex query with Criteria

I am trying to execute the following query:

SELECT * FROM notification WHERE
( (code=0) OR
(code <>0) AND (type='C') )

I have tried (I think) every possible combination of
Criteria.add, Criteria.and and Criteria.or and I can't
get it to spit out the correct SQL code. It keeps
putting:

WHERE type='C'

at the beginning of the query and then lumping
together the "code" part:

( (code=0) AND (code<>0) )

Anyone have a clue how I can do this? I would prefer
not to use executeQuery() instead ...

Many thanks!
syg


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org