[postgis-users] SQL Statement for Multiple Tables - operator doesn't exist: boolean && geometry

Adam adam at spatialsystems.org
Wed Jan 11 22:39:08 PST 2006


I have three tables:  zip codes, metro areas, and states.

My sql statement is:

SELECT zipcodes.name, urban_areas.name, states.state FROM zipcodes, 
urban_areas, states WHERE distance( zipcodes.the_geom, 'POINT(-88.0501 
41.8623)') = 0 AND zipcodes.the_geom && urban_areas.the_geom && 
states.the_geom

When I try to query them all in one statement I get this error:
operator does not exist, boolean && geometry
Hint:  No operator matches the given name and argument type(s).  You may 
need to add explicit type casts.

If I run this statement with only two tables instead of three this statement 
will work.

How should I join three plus tables and query for one locaton? 




More information about the postgis-users mailing list