Switch the column type to double.

 From the manual:
If you are comparing FLOAT or DOUBLE columns with numbers that have 
decimals, you can't use =! This problem is common in most computer 
languages because floating-point values are not exact values:
mysql> SELECT * FROM table_name WHERE float_column=3.5;
    ->
mysql> SELECT * FROM table_name WHERE float_column between 3.45 and 3.55;
In most cases, changing the FLOAT to a DOUBLE will fix this!

http://www.mysql.com/doc/N/o/No_matching_rows.html

At 05:19 PM 6/7/01 -0700, you wrote:
>On 6/7/01 4:50 PM, "Eric Fitzgerald" <[EMAIL PROTECTED]> wrote:
>
> > When comparing float values, you have to use '' around the value.
> >
> > Your query should look like this:
> > select distinct sequence_id from sequence_protein where mol_wt = 
> '53211.62';
>
>Ok, I should have mentioned that I tried the quotes.
>I am running out of ideas.
>
>Hannes
>
>mysql> select sequence_id, mol_wt from sequence_protein limit 1;
>+-------------+----------+
>| sequence_id | mol_wt   |
>+-------------+----------+
>|      100368 | 53211.62 |
>+-------------+----------+
>1 row in set (0.02 sec)
>
>mysql> select sequence_id from sequence_protein
>     -> where mol_wt = '53211.62';
>Empty set (0.15 sec)
>
>mysql> select sequence_id from sequence_protein
>     -> where mol_wt = "53211.62";
>Empty set (0.16 sec)
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to