update A set FResponPositionID=(select FResponPositionID from B where A.funitid=B.fid
and B.fisleaf=1 and B.FIsOUSealUp=0 and B.FResponPositionID <>A.FResponPositionID);
实际过程中:
将T_ORG_OUPartAdmin表中的FResponPositionID更新为对应的t_org_admin 中的FResponPositionID,具体如下:
update T_ORG_OUPartAdmin set FResponPositionID=(select FResponPositionID from t_org_admin where T_ORG_OUPartAdmin.funitid=t_org_admin.fid
and t_org_admin.fisleaf=1 and t_org_admin.FIsOUSealUp=0 and t_org_admin.FResponPositionID <>T_ORG_OUPartAdmin.FResponPositionID);