Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: brain teaser

Re: brain teaser

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Sun, 24 Jun 2007 16:08:36 +0100
Message-ID: <467E88F4.80508@dial.pipex.com>


jamesd wrote:
> Ok, I have a very challenging brain teaser for the sql gods.
>
> We have a very simple sql table that lists every city in the world,
> like this
>
> *cityname*, *lat*, *lon*
> baltimore, 111.333, -38.3333
> boston, 112.11111, -22.2222
> rio , 23.01007 ,33.7233963
> (etc, 3 million rows)
>
> I am tasked me with writing a sql statement that will find all cities
> that fall into 4 lat/lon coordinates Plygon (NOT a perfect square).
>
> For instance the coordinates are:
>
>
>
> lat1=23.01007 lon1=33.7233963
>
> lat2=23.0183048 lon2=33.816658
>
> lat3=21.9754562 lon3=33.8121071
>
> lat4=21.9797649 lon4=33.7281723
>
> Does anybody care to help here :) Any math math or geography people
> in here? :)
>

There's a product for that Oracle Locator (free with SE and EE) or Spatial (extra cost option with EE).

-- 
Niall Litchfield
Oracle DBA
http://www.orawin.info/services
Received on Sun Jun 24 2007 - 10:08:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US