On 6/7/01 5:33 PM, "Gary Huntress" <[EMAIL PROTECTED]> wrote:

> I'll bet it's a roundoff problem....try select * from sequence_protein where
> mol_wt> 53211.62 and mol_wt < 53211.63
> 
> 
> Regards,
> Gary "SuperID" Huntress
> =======================================================
> FreeSQL.org offering free database hosting to developers
> Visit http://www.freesql.org
> 
> ----- Original Message -----
> From: "Hannes Niedner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 07, 2001 5: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
>> 
> 
You guys are great and solved my case

mysql> select sequence_id from sequence_protein
    -> where truncate(mol_wt,2) =53211.62;
+-------------+
| sequence_id |
+-------------+
|      100368 |
+-------------+
1 row in set (0.18 sec)

I do apologize, I was following the wrong thread in the manual.

Thanx 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

Reply via email to