DECLARE @GeographyCoordinate Geography DECLARE @Area Geography SET @GeographyCoordinate=Geography::Point(47.79208,-65.71996,4326) SET @Area=@GeographyCoordinate.STBuffer(9931*1000) SELECT Company.PrimaryKey,@GeographyCoordinate.STDistance(Geography)/1000 AS Distance FROM Company WHERE @Area.STIntersects(Company.Geography)=1However, if I add one kilometer:
DECLARE @GeographyCoordinate Geography DECLARE @Area Geography SET @GeographyCoordinate=Geography::Point(47.79208,-65.71996,4326) SET @Area=@GeographyCoordinate.STBuffer(9932*1000) SELECT Company.PrimaryKey,@GeographyCoordinate.STDistance(Geography)/1000 AS Distance FROM Company WHERE @Area.STIntersects(Company.Geography)=1...it cannot find any more record.