[postgis-users] updating a geometry column, db procedure needed?
Nicolas Ribot
nicky666 at gmail.com
Mon Sep 12 10:58:30 PDT 2005
> Hi list,
>
> I have 2 tables:
>
> 1) an address table with postal code, house no., X and Y columns (no
> geometry column)
> 2) another table X which has postal code and house no.
>
> I have added a geometry column to table X and want to update it with
> address matching from the address table using postal code and house no.
>
> Can I do this with plain SQL? Or do I need a database procedure to do this
> for all of the records?
>
> Thanks in advance.
>
Hi Bart.
You can do that with plain SQL, something like (pseudo SQL)
update x set the_geom = makePoint(address.X, address.Y)
from address where X.address.postal_code = postal_code and X.house_no = house_no
Nicolas
More information about the postgis-users
mailing list