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
Your query should look like this:
UPDATE incode_warrants
SET warn_docket_no = incode_violations.viol_docket_no
FROM incode_violations
WHERE incode_violations.viol_citation_no = incode_warrants.warnv_citation_no
AND incode_violations.viol_viol_no = incode_warrants.warnv_viol_no;
You don't need any other join. With this query you just update a column in one table with values from a column from another table. Of course, it updates only when WHERE
condition is true.