I'm up now
I have this for my SQL Server:
CREATE PROCEDURE zip_nearby_locations
@lat1 float,
@long1 float,
@radius float
AS
SELECT (2*3956*ASIN(
(SQRT( POWER(SIN((([EMAIL PROTECTED]))/2),2) + COS(@lat1) * COS(rlat)
* POWER(SIN(((abs(rlong)[EMAIL PROTECTED]))/2),2) )) )
) AS dist, location, zipcode
FROM Zipcodes
WHERE (2*3956*ASIN(
(SQRT( POWER(SIN((([EMAIL PROTECTED]))/2),2) + COS(@lat1) * COS(rlat)
* POWER(SIN(((abs(rlong)[EMAIL PROTECTED]))/2),2) )) )
) < @radius
ORDER BY dist
GO
But I was wondering how to do this in VFP
At 01:58 AM 8/2/2006, you wrote:
And I worry that I drink to much caffeine!
--
Michael Hawksworth
Visual Fox Solutions
[EMAIL PROTECTED]
www.foxpro.co.uk
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.