Same as the actual Postgres UPDATE :
UPDATE incode_warrants iw SET warn_docket_no = iv.viol_docket_no FROM incode_warrantvs iwvs JOIN incode_violations iv ON iv.viol_citation_no = iwvs.warnv_citation_no AND iv.viol_viol_no = iwvs.warnv_viol_no WHERE iw.warn_rid = iwvs.warnv_rid;
You cannot just use the table alias in the FROM as the target table in the UPDATE clause. The table (one!) To be updated occurs immediately after UPDATE . You can add an alias there if you wish. This is the immediate cause of your error message, but there is more.
The column to be updated is always from the same table, which must be updated, and cannot be qualified according to the table.
You do not need to repeat the target table in the FROM .
All this and more in a great guide.
source share