update t_hr_teadept set rjkm=b.yjkmfrom t_hr_teadept a inner join t_tr_bzxx_km b on a.bzh=b.bzh where a.bmjb='2' and isnull(a.rjkm,'')=''