Based on the following tables:
Street
Municipality
I'd like to populate Street.NOM_ENTStreet.NOM_ENT
with Municipality.NOM_ENTMunicipality.NOM_ENT
and Street.NOM_MUNStreet.NOM_MUN
with Municipality.NOMBREMunicipality.NOMBRE
any time Street.geomStreet.geom
is within Municipality.geomMunicipality.geom
.
In other words, I have a table with all the streets in a country and I need to add to witchwhich state and county that street belongs.
I know how to check if Street.geomStreet.geom
is within Municipality.geomMunicipality.geom
, but I'm kind of new working with postgis/postgres and I'm not sure how to use this as a condition for an UPDATE query.