update t_gtzz_subject as t1 join t_base_organization as t2 on t1.xmdw=t2.org_name set t1.xmdw_code=t2.org_code
where t1.xmdw_code is null;