Re: zip code search



What you have to do is find a function that you can use in your sql
query to calculate distance -- if you google the sqlserver.programming
group I'm sure you'll find one -- I've done this but I don't have it
handy.
Then your query looks something like this:

select myCalculation(lat,long,dealerLat,dealerLong) as Distance,
dealerName from myTable
order by Distance

(obviously a prerequisite would be getting the lat/long for the zips).

.



Relevant Pages

  • Re: DBRW generating ADODB.Command error 800a0cc1
    ... Source: Microsoft JET Database Engine ... My guess the Distance variable is causing the problem. ... When I verify the query it says it was verified with the database ... I have 2 text boxes on the form, EnterZip and Distance, and I have the ...
    (microsoft.public.frontpage.programming)
  • Re: DBRW generating ADODB.Command error 800a0cc1
    ... Distance is assumed to be numeric, and EnterZip is a string value - you should have code to ensure these have the correct value types. ... Also note that the sql statement above has been reformatted for the FrontPage database results wizard - it is not valid SQL. ... When I verify the query it says it was verified with the database ...
    (microsoft.public.frontpage.programming)
  • Re: DBRW generating ADODB.Command error 800a0cc1
    ... When I verify the query it says it was verified with the database ... I have 2 text boxes on the form, EnterZip and Distance, and I have the ...
    (microsoft.public.frontpage.programming)
  • Re: DBRW generating ADODB.Command error 800a0cc1
    ... and minimum longitudes and latitudes to pass to the next form, ... When I verify the query it says it was verified with the database ... I have 2 text boxes on the form, EnterZip and Distance, and I have the form ...
    (microsoft.public.frontpage.programming)
  • Re: MySQL Query Optimization
    ... > query can take 15 seconds or more for broader searches. ... What you really need is a precomputed table of distances between zip codes. ... any location in one block is within distance of any location in the other). ... The distance table would consist of pairs of three-digit zones that meet ...
    (comp.lang.php)