Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting from distance for geography coordinates
Message
De
22/11/2011 12:10:05
 
 
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:
01529547
Vues:
17
>>>>>Right, but it was in the original select statement as well. I want to attempt to filter data first as it was using and then apply distance filter. In case of CTE it may not be relevant, but in case of temp table it will.
>>>>
>>>>
>>>>No, this was the original SQL Re: Getting from distance for geography coordinates Thread #1529492 Message #1529521
>>>>
>>>>Relevant or not - it's sloppy programming to say the least
>>>
>>>I don't understand you. If that condition was in the original SQL Statement, do we want to preserve it or not? I assume that this condition does a rough filtering and then distance filtering is more precise. If this assumption is correct, then we may want to use this 'rough' filtering first to get less records and then apply more precise filtering based on the computed column.
>>
>>Your cte already returns records where the distance is less than or equal to 250
>>
>>Then why select from the cte the set where the distance is less than or equal to 250 ? You don't need the second where
>
>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
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform