I am trying to update a column in PostGIS using information from a column in another table where they spatially intersect. I looked up how to do this on the PostgreSQL tutorial and I think that I should have the SQL correct. However, I am getting an error message that says:
ERROR: missing FROM-clause entry for table "buildingid"
This is what I have so far:
UPDATE sr_mld_dc
SET building_id = buildingid.washington_dc_2dbd
FROM washington_dc_2dbd
WHERE ST_CONTAINS(washington_dc_2dbd.geom, sr_mld_dc.geom);
So far I have tried to change the order of the lines with no success, and the current order is how the PostgreSQL tutorial set theirs up. If anybody could point me in the right direction that would be excellent.