-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: complex query
PostPosted: Mon Mar 22, 2004 5:05 pm 
Beginner
Beginner

Joined: Fri Nov 28, 2003 11:21 am
Posts: 49
Location: Buenos Aires, Argentina
Hello im making a complex query(at least for me),and the results are not what i'm expecting.
The thing is very simple ,date before and date after,when the date after is null ,i have to verified that the parameter is bigger than date before else check that the parameter is smaller than date after.
The query is the following.
losSuplementos = BossDB.find("from Suplemento as suple " +
"where (suple.vigencia.fechaHasta is null and suple.vigencia.fechaDesde > '" + fecha.toString() + "') or suple.vigencia.fechaHasta < '" + fecha.toString() + "'" +
" and suple.producto.idElementoEditorial =" + idProducto + " and suple.habilitado =" + 1 +
" and suple.bajaLogica =" + 0 +
" order by suple.orden");

----
Using hibernate2.11
mssqlserver 2000
There are no exceptions.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.