update ASDK_INCIDENT set inci_solution_real_date = asdk_action_hist.achi_created from ASDK_INCIDENT JOIN asdk_action_hist ON ASDK_INCIDENT.inci_id = asdk_action_hist.achi_item_id join asdk_hist_modify on asdk_hist_modify.himo_action_hist_id = asdk_action_hist.achi_id and himo_field_modified='STATUS' WHERE HIMO_NEW_VALUE=5 and inci_fl_int_project_id=2 AND inci_solution_real_date = NULL