I am using SQL Server 2008 spatial data types. I have a table with all States (as polygons) as data type GEOMETRY. Now I want to check if a point\'s coordinates (latitudes,
declare @g geometry set @g=geometry::STGeomFromText('POLYGON((-33.229869 -70.891988, -33.251124 -70.476616, -33.703094 -70.508045, -33.693931 -70.891052,-33.229869 -70.891988))',0) DECLARE @h geometry; SET @h = geometry::STGeomFromText('POINT(-33.3906300 -70.5725020)', 0); SELECT @g.STContains(@h);