Most specific match using between

From: mmiranda(at)americatel(dot)com(dot)sv
To: pgsql-general(at)postgresql(dot)org
Subject: Most specific match using between
Date: 2005-04-21 15:51:16
Message-ID: 76E0DAA32C39D711B6EC0002B364A6FA043DCDF7@amsal01exc01.americatel.com.sv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi people, is there a swtich or something to instruct a between statement
hat it must perform a most specific match ?
These are the details, i have these table

name | start | end
---------------+---------------+-----------------
general | 2660000 | 2669999
specific | 2660124 | 2660124
(2 rows)

unsing the query: select name where '2660124' between start and end

i got:

name
---------
general
specific

How can i get only specific?

thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fritz Bayer 2005-04-21 15:54:41 Re: Encoding problem
Previous Message Scott Marlowe 2005-04-21 15:38:32 Re: Suggestions