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';
----- Original Message -----
From: "Hannes Niedner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 07, 2001 2:48 PM
Subject: Select query
>
> What do I do wrong? The query result is not supposed to be an empty set
> (please cc your response to [EMAIL PROTECTED])
>
> 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 distinct sequence_id from sequence_protein
> -> where mol_wt=53211.62;
> Empty set (0.12 sec)
> ????????????????????????????????????????????????????????????????
>
> mysql> describe sequence_protein;
> +-------------+------------------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +-------------+------------------+------+-----+---------+-------+
> | sequence_id | int(10) unsigned | | PRI | 0 | |
> | length | int(10) unsigned | | | 0 | |
> | mol_wt | float(10,2) | YES | | 0.00 | |
> +-------------+------------------+------+-----+---------+-------+
>
> Thank you
>
> Hannes
>
>
> ---------------------------------------------------------------------
> 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