update FINAL_DEGREE_WORK_PROPOSAL, TEACHER, PARTY
set FINAL_DEGREE_WORK_PROPOSAL.KEY_ORIENTATOR = PARTY.ID_INTERNAL
where FINAL_DEGREE_WORK_PROPOSAL.KEY_ORIENTATOR = TEACHER.ID_INTERNAL
and TEACHER.KEY_PERSON = PARTY.ID_INTERNAL ;

update FINAL_DEGREE_WORK_PROPOSAL, TEACHER, PARTY
set FINAL_DEGREE_WORK_PROPOSAL.KEY_COORIENTATOR = PARTY.ID_INTERNAL
where FINAL_DEGREE_WORK_PROPOSAL.KEY_COORIENTATOR = TEACHER.ID_INTERNAL
and TEACHER.KEY_PERSON = PARTY.ID_INTERNAL ;