Posted by bref Fri 2nd Mar 2007 16:11 - Syntax is SQL - 29 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
-
SELECT asciiname,latitude,longitude, acos(SIN( PI()* 0 /180 )*SIN( PI()*latitude/180 )
-
)+(cos(PI()* 0 /180)*COS( PI()*latitude/180) *COS(PI()*longitude/180-PI()* -73.99319 /180)
-
)* 3963.191 AS distance
-
FROM allcountries
-
WHERE 1=1
-
AND 3963.191 * ACOS( (SIN(PI()* 0 /180)*SIN(PI() * latitude/180)) +
-
(COS(PI()* 0 /180)*cos(PI()*latitude/180)*COS(PI() * longitude/180-PI()* -73.99319 /180))
-
) < = 1.5
-
ORDER BY 3963.191 * ACOS(
-
(SIN(PI()* 0 /180)*SIN(PI()*latitude/180)) +
-
(COS(PI()* 0 /180)*cos(PI()*latitude/180)*COS(PI() * longitude/180-PI()* -73.99319 /180))
-
)
PermaLink to this entry https://pastebin.co.uk/11299
Posted by bref Fri 2nd Mar 2007 16:11 - Syntax is SQL - 29 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Comments: 0