I'm trying to update a table called incode_warrants and set the warn_docket_no to the viol_docket_no from the incode_violations table.
When the SQL query below fires in PostgreSQL 9.3 I get:
Error : ERROR: relation "iw" does not exist LINE 1: update iw
How do I get this query right?
UPDATE iw
SET iw.warn_docket_no = iv.viol_docket_no
FROM incode_warrants as iw
INNER JOIN incode_warrantvs as iwvs
ON iw.warn_rid = iwvs.warnv_rid
INNER JOIN incode_violations as iv
ON iv.viol_citation_no = iwvs.warnv_citation_no
AND iv.viol_viol_no = iwvs.warnv_viol_no