[postgis-users] Query Help

Paul Ramsey pramsey at cleverelephant.ca
Tue Jan 13 08:07:05 PST 2009


SELECT o.name, o.id, s.name
FROM offenders o, schools s
WHERE ST_DWithing(o.the_geom, s.the_geom, 500)
  AND o.status = 'TRUE';

On Tue, Jan 13, 2009 at 7:56 AM, chris brisendine <cbriz882 at gmail.com> wrote:
> I am trying to do a query where I have two point tables one is
> offenders and the other is schools I want to out put the list of
> offenders by offender name and offender id within 500 meters of any
> school but I don't think my query is correct. Can someone please help
> me with this query
>
> field's are offender.status(Witch would be true),offender.name, offender.id
>
>  SELECT offenders, school_name
>  FROM schools
>  WHERE st_dwithin(the_geom, 'OFFENDER=TRUE',500)
>
>
> Thanks,
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list