delete from t_pom_mftreportactivity a where exists (select 1 from t_pom_mftreportsummary b where a.fdetailid = b.fentryid);
insert into t_pom_mftreportactivity (fentryid,fdetailid,frepresources,frepactualbegintime,frepactualfinishtime) select fentryid,fentryid,max(fresourceid),max(fbegintime),max(fendtime) from t_pom_mftreportsummary where fresourceid is not null and fresourceid <> 0 group by fentryid;