Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    4

    Unanswered: 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.

  2. #2
    Join Date
    Oct 2011
    Location
    Hamburg, Germany
    Posts
    18
    why not?

    156729 <=156758 <=157043

  3. #3
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    The statement you have written is returning the correct rows, what are you trying to achieve with your query?
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •