I get most of my postal code information from here for free.  It is not the
most recent (which you can pay other services for that info) but it is
useful.

http://www.census.gov/geo/www/gazetteer/places2k.html

I also have a MS-SQL UDF I use.  It's really fast. (Although I couldn't tell
you where I found it)


CREATE FUNCTION [dbo].[calcLatLongDist]
(
        @lat_A decimal(28, 16)
        , @long_A decimal(28, 16)
        , @lat_B decimal(28, 16)
        , @long_B decimal(28, 16)
)
RETURNS decimal(28, 16)
AS
BEGIN
        DECLARE
                @Distance decimal(28, 16)
        
        SET @Distance = (Sin(Radians(@lat_A)) *
                Sin(Radians(@lat_B)) +
                Cos(Radians(@lat_A)) *
                Cos(Radians(@lat_B)) *
                Cos(Radians(@long_A - @long_B)))

        SET @Distance = (Degrees(ACos(@Distance))) * 69.09

        RETURN @Distance
END



-----Original Message-----
From: Rick Root [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 05, 2007 3:43 PM
To: CF-Talk
Subject: Postal Code database and proximity

Is anyone out there using "within 25 miles of <zipcode>" for searching
address database?

I've gotten a request where someone is visiting a certain zip code and
they want to know all the prospects within a 25 mile radius of the zip
code they're visiting.

I know there are ways to do this.. just wondered what people out there
are using.

Thanks!

Rick

This email message may contain privileged and/or confidential information.
If you are not the intended recipient(s), you are hereby notified that any
dissemination, distribution, or copying of this email message is strictly
prohibited. If you have received this message in error, please immediately
notify the sender and delete this email message from your computer.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268741
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to