-->
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.  [ 2 posts ] 
Author Message
 Post subject: Search with a tolerance on float
PostPosted: Mon Dec 05, 2005 10:35 am 
Hi,

I'm searching a NH object in database, my search criteria is a float number which must me close to an expected value.

I'm doing something like "from xxx where e.Price >= 1.411 and e.Price <= 1.413".

Is there a way to express that using something like "where IsAround(E.Price,1.142,0.001)" instead ?

kind regards

Thibaut


Top
  
 
 Post subject:
PostPosted: Mon Dec 05, 2005 11:31 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
If your RDBMS has a function like this, you may try to use it...
You may also try "e.Price between 1.411 and 1.413".

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


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

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.