This is a discussion on Zip code,Proximity within the Database Support forums, part of the Web Development category; Can u somebody explain how to find the proximity of the zip code ...using zip code database...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Can u somebody explain how to find the proximity of the zip code ...using zip code database Last edited by kingmaker : 10-28-2007 at 10:26 PM. |
| Sponsored Links |
| |||
| I want to Locates ZIP Codes that are within close proximity of a specified ZIP Code. specify the radius distance in miles, to find a list of ZIP Codes that fall within that radius is displayed Last edited by kingmaker : 10-26-2007 at 03:37 AM. |
| |||
| The below SP supports and find the list of Zipcode within radius CREATE PROC GetZipCodesWithinRadius @ZipCode char(5) , @GivenMileRadius int AS SET NOCOUNT ON DECLARE @lat1 float, @long1 float SELECT @lat1= latitude, @long1 = longitude FROM ZipSource WHERE zipcode = @ZipCode SELECT ZipCode ,DistanceInMiles FROM ( SELECT ZipCode,3958.75 * ( Atan(Sqrt(1 - power(((Sin(@Lat1/57.2958) * Sin(latitude/57.2958)) + (Cos(@Lat1/57.2958) * Cos(latitude/57.2958) * Cos((longitude/57.2958) - (@Long1/57.2958)))), 2)) / ((Sin(@Lat1/57.2958) * Sin(latitude/57.2958)) + (Cos(@Lat1/57.2958) * Cos(latitude/57.2958) * Cos((longitude/57.2958) - (@Long1/57.2958)))))) DistanceInMiles FROM ZipSource ) a WHERE a.DistanceInMiles <= @GivenMileRadius --AND ZipCode <> @ZipCode ORDER BY DistanceInMiles GO EXEC GetFindZipCodesWithinRadius '11566',20 GO Do u have zip code ?did u purchase the ZipCode DB....
__________________ The MOSS Master of Solution Service Last edited by Anandavinayagam : 10-11-2007 at 08:22 AM. |
| |||
| No....I got from surfing in google as dmp file that is approx 54mb(43,000 records) forgot the URL.......... Last edited by kingmaker : 10-26-2007 at 03:37 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Register dll or ocx using through code in C# | oxygen | C# Programming | 4 | 08-06-2008 12:58 AM |
| I want the explanation for the below example code.. | oxygen | PHP Programming | 1 | 07-26-2007 03:39 AM |
| optimizing the code | vijayanand | PHP Programming | 0 | 07-17-2007 12:25 AM |
| JAVA code from PHP | ramkumaraol | PHP Programming | 2 | 07-16-2007 11:54 PM |
| Perl Code from PHP | sivaramakrishnan | PHP Programming | 1 | 07-16-2007 11:15 AM |