<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
</head><body><p class="ox-79e96e5d2c-MsoNormal">HI I’m struggling with retuning data from the following query. It should be retuning all data within a 5k radius of a given Longitude, Latitude point.</p><p class="ox-79e96e5d2c-MsoNormal">Select stuff from MyGeoTable where ST_DWithin(ST_GeographyFromText(‘SRID=4326;POINT(LONG,LAT)’), geog,5000)</p><p class="ox-79e96e5d2c-MsoNormal">Is not retuning all data it should be best guess there is an issue with the Geography column  this was created from a geometry column which is a collection of points lines and polygons</p><p class="ox-79e96e5d2c-MsoNormal">I tried to recreate the Geography thus</p><p class="ox-79e96e5d2c-MsoNormal" style="margin-left: 72.0pt;">Update MyGeoTable set geog = ­(ST_Transform(geom,4326));</p><p class="ox-79e96e5d2c-MsoNormal">This gives “ERROR: Geometry type (LINSTRING) dose not match column type (Polygon)”</p><p class="ox-79e96e5d2c-MsoNormal">My question  is twofold</p><p class="ox-79e96e5d2c-MsoNormal">1<sup style="line-height: 0;">st</sup> how can recreate the geography column, check it has worked?</p><p class="ox-79e96e5d2c-MsoNormal">2<sup style="line-height: 0;">nd</sup>  How might perform a similar query just using the geometry the 5k radius doesn’t have to be exact!</p><p class="io-ox-signature">Thanx for your help<br></p></body></html>