• Ask a Question
  • Create a Poll
150
    Ask a Question
    Cancel
    150
    More answer You can create 5 answer(s).
      Ask a Poll
      Cancel

      RE: Select coordinates which fall within a radius of a central point?

      The SQL below should work:

      SELECT*FROM Table1 a 
      WHERE(
                acos(sin(a.Latitude *0.0175)* sin(YOUR_LATITUDE_X *0.0175)+ cos(a.Latitude *0.0175)* cos(YOUR_LATITUDE_X *0.0175)*    
                       cos((YOUR_LONGITUDE_Y *0.0175)-(a.Longitude *0.0175)))*3959<= YOUR_RADIUS_INMILES
            )
      Asked by dakachi on June 9, 2014 in No Category.
      0 Answers

      The SQL below should work:

      SELECT*FROM Table1 a 
      WHERE(
                acos(sin(a.Latitude *0.0175)* sin(YOUR_LATITUDE_X *0.0175)+ cos(a.Latitude *0.0175)* cos(YOUR_LATITUDE_X *0.0175)*    
                       cos((YOUR_LONGITUDE_Y *0.0175)-(a.Longitude *0.0175)))*3959<= YOUR_RADIUS_INMILES
            )
      Answered by dakachi on June 9, 2014..