Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dev:sql:functions:distance [2009/12/09 14:31]
tdo created
dev:sql:functions:distance [2012/10/26 14:28] (current)
Line 27: Line 27:
   * LONG_HEMISPHERE=[E | W]   * LONG_HEMISPHERE=[E | W]
  
-===== Example ​===== +===== Examples ​===== 
-==== Compare latitudes ​and longitudes in a table against constant ​latitude ​and longitude: ====+ 
 +==== Simple distance between two longitude ​and latitude ​points: ====
  
   select $distance(40.0,​ -105.0, 41.0, -106.0) ​   select $distance(40.0,​ -105.0, 41.0, -106.0) ​
       from $omnidex ​       from $omnidex ​
  
-==== Compare latitudes and longitudes in a table against ​single ​latitude and longitude ​derived from a nested query: ====+==== Compare latitudes and longitudes in a table against ​constant ​latitude and longitude: ====
  
   select $distance(40.0,​ -105.0, latitude, longitude), latitude, longitude,   select $distance(40.0,​ -105.0, latitude, longitude), latitude, longitude,
Line 39: Line 40:
       where $distance(40.0,​ -105.0, latitude, longitude) < 10       where $distance(40.0,​ -105.0, latitude, longitude) < 10
  
-==== Compare latitudes and longitudes in a table against ​multiple latitudes ​and longitudes ​derived from a nested query: ====+==== Compare latitudes and longitudes in a table against ​single latitude ​and longitude ​derived from a nested query: ====
  
   select latitude, longitude,   select latitude, longitude,
Line 46: Line 47:
       where zip = ‘80301’),​       where zip = ‘80301’),​
       latitude, longitude) < 10       latitude, longitude) < 10
 +
 +==== Compare latitudes and longitudes in a table against multiple latitudes and longitudes derived from a nested query: ====
  
   select latitude, longitude,   select latitude, longitude,
 
Back to top
dev/sql/functions/distance.1260369101.txt.gz · Last modified: 2012/10/26 14:27 (external edit)