Skip to main content

How find Nearest points using STBuffer and STContains in SQLServer using given point from point table?

This is the Query I am using now..

 SELECT top 1 coloumname FROM tablename WHERE ROUND
    ((geometry::Point(74.8427116215336,12.852857058953,4326).STDistance(the_geom))*111.325,2) <2
    ORDER BY ROUND((geometry::Point(74.8427116215336,12.852857058953,4326).STDistance(the_geom))*111.325,2)

How can I change this to using STBuffer?

Ratheesh
  • 115
  • 1
  • 9