update t_er_dailyreimbursebill As A set (Fhead_Paydate) = (select max(ftargetpaydate) from t_er_dailyreimpayentry As B where B.fid = A.fid  group by B.fid);
update t_er_dailyloanbill As A set (Fhead_Paydate) = (select max(ftargetpaydate) from t_er_loanbillpayentry As B where B.fid = A.fid  group by B.fid);
update t_er_pubreimbill As A set (Fhead_Paydate) = (select max(ftargetpaydate) from t_er_publicreimpayentry As B where B.fid = A.fid  group by B.fid);
update T_ER_ReqBill As A set (Fhead_Paydate) = (select max(ftargetpaydate) from t_er_tripreqpayentry As B where B.fid = A.fid  group by B.fid);
update T_ER_ReimburseBill As A set (Fhead_Paydate) = (select max(ftargetpaydate) from t_er_tripreimpayentry As B where B.fid = A.fid  group by B.fid);