>>DECLARE @g geography, >> @area geography ; >>SET @g = geography::Point(47.7795,-65.7191,4326) ; --Petit-Rocher >>SET @area = @g.STBuffer(250) ; >> >>SELECT locationId, >> Latitude, >> Longitude, >> @g.STDistance(geoPoint) AS distance >>FROM ( SELECT locationId, >> Latitude, >> Longitude, >> geography::Point(Latitude,Longitude,4326) AS geoPoint >> FROM result >> ) geoData >>WHERE @area.STIntersects(geoData.geoPoint) = 1 ;>