If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Wrong data being returned

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-11, 14:26
gosman gosman is offline
Registered User
 
Join Date: Feb 2005
Posts: 4
Wrong data being returned

I'm running the following statement

select minx,maxx,miny,maxy from TABLE where 523892 between minx AND maxx AND 156758 between miny AND maxy

There are 2 rows being returned. (below)

minx | maxx | miny | maxy

522962 | 524063 | 156729 | 157043
523867 | 523892 | 156742 | 156797


I can't understand why row 1 is being returned.

156758 does not fall between 156729 and 157043

It's driving me crazy, help much appreciated.
Reply With Quote
  #2 (permalink)  
Old 10-13-11, 14:59
shureg shureg is offline
Registered User
 
Join Date: Oct 2011
Location: Hamburg, Germany
Posts: 15
why not?

156729 <=156758 <=157043
Reply With Quote
  #3 (permalink)  
Old 10-14-11, 02:31
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
The statement you have written is returning the correct rows, what are you trying to achieve with your query?
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On