Greetings, The MySQL statement:
SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin ( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < 25 ORDER BY distance Does not work with MS SQL Server as "distance" cannot be used in the HAVING and ORDER BY clauses. Does any one have a suggestion? Thank you, Jacques On Nov 8, 12:59 pm, quesnelj <[email protected]> wrote: > I have not completely read the article yet, but looks like what I've > been searching. Thank you. If any one comes up with a classic ASP and > MS SQL that would be the best. For now, I'll check this out and hope > for the best. > > Thanks again... > > Jacques > > On Nov 2, 4:45 am, Rossko <[email protected]> wrote: > > > > I have a DB containing business location addresses entered by clients. > > > I want other clients to enter a zip code and have my application > > > return all businesses in my DB that is physically near (20miles, > > > 30miles, 40miles, ...) the entered zip. Displaying on a map would be > > > nice, but not mandatory. > > > The classic example of using db with maps for 'search > > nearby'http://googlemapsapi.blogspot.com/2008/01/article-creating-store-loca... -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=.
