List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:March 4 2010 8:07pm
Subject:Re: 5.1.44 community version select ordno>=' ' error (2)
View as plain text  
Wang,

> select * from t1 where ordno>='  ' 
gets wrong  result 2 rows

I doubt you'll get many helpful responses till you post the INSERTs.

PB

-----

wang shuming wrote:
> Oh,
>    If any char fields add to index key ,then the >=' ' gets wrong .
>
>   ordno, qty ,mem
>                1
>                3
>                5
>     aaa    18
>     bbbbb 20
>
>   1. CREATE TABLE `t1` (
>   `mid` int(11) NOT NULL,
>   `qty` decimal(12,2) NOT NULL DEFAULT '0.00',
>   `ordno` char(8) NOT NULL DEFAULT '',
>   `mem` char(1) DEFAULT '',
>   PRIMARY KEY (`mid`),
>   KEY `key03` (`ordno`))
>
> select * from t1 where ordno>='  '
>  gets wrong  result 2 rows
>
> 2CREATE TABLE `t1` (
>   `mid` int(11) NOT NULL,
>   `qty` decimal(12,2) NOT NULL DEFAULT '0.00',
>   `ordno` char(8) NOT NULL DEFAULT '',
>   `mem` char(1) DEFAULT '',
>   PRIMARY KEY (`mid`))
>
> select * from t1 where ordno>='  '
>  gets  OK 5 rows
>
> 3.CREATE TABLE `t1` (
>   `mid` int(11) NOT NULL,
>   `qty` decimal(12,2) NOT NULL DEFAULT '0.00',
>   `ordno` char(8) NOT NULL DEFAULT '',
>   `mem` char(1) DEFAULT '',
>   PRIMARY KEY (`mid`),
>   KEY `key03` (`mem`))
>
> select * from t1 where mem>='   '
> 0 rows  wrong
>
> 4.CREATE TABLE `t1` (
>   `mid` int(11) NOT NULL,
>   `qty` decimal(12,2) NOT NULL DEFAULT '0.00',
>   `ordno` char(8) NOT NULL DEFAULT '',
>   `mem` char(1) DEFAULT '',
>   PRIMARY KEY (`mid`))
>
> select * from t1 where mem>='   '
>  5 rows OK
>
> Regards!
>
> Shuming wang
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.435 / Virus Database: 271.1.1/2721 - Release Date: 03/03/10 19:34:00
>
>   

Thread
5.1.44 community version select ordno>=' ' error (2)wang shuming4 Mar
  • Re: 5.1.44 community version select ordno>=' ' error (2)Dan Nelson4 Mar
Re: 5.1.44 community version select ordno>=' ' error (2)wang shuming4 Mar
  • Re: 5.1.44 community version select ordno>=' ' error (2)Peter Brawley4 Mar