Leaving aside that's kind of an ugly data model and you might consider putting everything into one table:
select foo,bar from texas where st_intersects(the_geom, 'POLYGON()') union select foo,bar from virginia where st_intersects(the_geom, 'POLYGON()') P On Sat, May 16, 2009 at 7:23 AM, Smith Roman <[email protected]> wrote: > Hi, > My database has street maps of different states. Each state is represented > by a table. How can i fetch the map of an area (assuming I have the bbox of > the area) whose geometries overlap two or more states (tables) . > How would the SQL query be written ? > Smith. > > > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > > _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
