I am trying to update a table using a temporary table.
Schema | Name | Type | Owner
------------+----------------------+----------+----------
pg_temp_11 | tmp_x | table | postgres
public | entities | table | postgres
However I am getting this error:
UPDATE entities SET "Name" = "tmp_x.Name" FROM tmp_x WHERE "entities.Ent_ID" = "tmp_x.Ent_ID";
ERROR: column "tmp_x.Name" does not exist -- the column Name exists
LINE 1: UPDATE entities SET "Name" = "tmp_x.Name" FROM tmp_x WHERE "...
What is the problem? The quotes around table columns?
update e set e.name = x.name from entities e inner join tmp_x x ON e.Ent_ID = x.Ent_IDENT_IDorEnt_IDorent_id