UPDATE submission_files sf, submission_galleys sg SET sf.assoc_type = 521, sf.assoc_id = sg.galley_id WHERE sf.file_id = sg.file_id AND sf.submission_id = sg.submission_id UPDATE submission_files sf, submission_galleys sg SET sf.assoc_type = 521, sf.assoc_id = sg.galley_id WHERE sf.file_id = sg.file_id AND sf.submission_id = sg.submission_id UPDATE submission_files SET assoc_type = 521, assoc_id = sg.galley_id FROM submission_galleys sg WHERE submission_files.file_id = sg.file_id AND submission_files.submission_id = sg.submission_id