Re: Query precision issue

2010-10-25 Thread Joerg Bruehe
Sairam, sorry to be so blunt, and please don't feel offended: Sairam Krishnamurthy wrote: > [[...]] > > Can somebody help me to find out the problem? I can very well truncate > the trailing zeros when querying, but I am interested in finding why an > additional trailing zero returns an empty se

Re: Query precision issue

2010-10-25 Thread Sairam Krishnamurthy
That is exactly the problem. It is float. Thanks for your input. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 10/25/2010 01:00 PM, Dan Nelson wrote: In the last episode (Oct 25), Sairam Krishnamurthy said: I have simple query like 'select * from table1 where column1=-107.689878'.

Re: Query precision issue

2010-10-25 Thread Dan Nelson
In the last episode (Oct 25), Sairam Krishnamurthy said: > I have simple query like 'select * from table1 where > column1=-107.689878'. This returns an empty set. But there is data > corresponding to this value of column. > > When I looked more into it, it seems like a precision issue. The

Re: Query precision issue

2010-10-25 Thread Carlos Proal
Thats because float columns store approximate data values, you may need to use an error range in comparison, or at your own discretion use the decimal data type. You can get more info in: http://dev.mysql.com/doc/refman/5.1/en/numeric-types.html http://dev.mysql.com/doc/refman/5.1/en/problems-

Query precision issue

2010-10-25 Thread Sairam Krishnamurthy
All, I have simple query like 'select * from table1 where column1=-107.689878'. This returns an empty set. But there is data corresponding to this value of column. When I looked more into it, it seems like a precision issue. The value for column1 is -107.689878. More interesting is tha