title: Best way to join on a range?
body: <p>I think this may be a common problem that may not have an answer for every tool. Right now we are trying to use amazons Redshift. The only problem we have now is we are trying to do a look up of zip code for an IP address. The table we have that connects IP to city is a range by IP converted to an integer.</p>
  
  <p>Example:</p>
  
  <pre><code>Start IP | End IP  | City
  
  | 123123 | 123129 | Rancho Cucamonga|
  </code></pre>
  
  <p>I have tried the obvious inner join on intip >= startip and intip &lt; endip.</p>
  
  <p>Does anyone know a good way to do this?</p>