You could try something like

mysql> select sequence_id from sequence_protein
    -> where truncate(mol_wt, 2) = 53211.62;

And, if you look truncate up in the manual, I think it even gives an
explanation as to why.

----- Original Message -----
From: "Hannes Niedner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 8:19
Subject: Re: Select query


> 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