Home Forums SQL Server 2008 T-SQL (SS2K8) returning rows within a certain distance in miles from city using longitude and latitude RE: returning rows within a certain distance in miles from city using longitude and latitude

  • KoldCoffee (11/22/2014)


    Serg, I am fine with the lowered accuracy given I am not querying for locations at either north or south pole but I can't get that sample query to work.

    Since a spatial index can only be applied against geography column and I can't make serg's query work for me I will look at another database we have (operational) which has a table populated with geography data types. It's hard to associate that one with the lead tables but if I can break through that barrier maybe that is only way to speed up this report.

    Can you share at least tables definitions ?