Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting from distance for geography coordinates
Message
 
 
À
22/11/2011 12:15:35
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01529492
Message ID:
01529553
Vues:
19
>>>>My cte only uses the original where - it does not restrict records based on the distance. I do need the final where clause.
>>>
>>>
>>>I give up
>>
>>One of us have some misunderstanding - I suppose it's you in this case.
>
>
>Of course it's me
>
>Count the number of fimes the number 250 occurs in your answer

Can you explain me what does this condition mean
WHERE (Latitude>=@Latitude3-250/111.0 AND Latitude<=@Latitude4+250/111.0) AND
  (Longitude>=@Longitude2-250/111.0 AND Longitude<=@Longitude3+250/111.0)) 
In other words, what exactly this condition is doing?

I think it's building a rectange and then we can filter based on the actual distance. Although what are all the numbers here and constants, it's not clear.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform