Hello, You should try :
update nodes a set outline_id = b.outline_id from outlines b where st_contains(b.geom, a.geom) Hugues. -------- Message d'origine-------- De: [email protected] de la part de Clifford Snow Date: ven. 24/05/2013 19:24 À: PostGIS Users Discussion Objet : [postgis-users] Need help with update table from a select query I need some help figuring out how to update a table. I'm trying to get the polygon id that a node resides in. I have two tables, one of outlines and another with nodes. I want to add the id of the outline the node is contained in to the node. my thought was this query: update nodes set outline_id = (select outline_id from oulines, nodes where st_contains(outline.geom, nodes,geom)) But this query returns more than one row. What am I doing wrong? Thanks -- Clifford
<<winmail.dat>>
_______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
