17,377
社区成员
发帖
与我相关
我的任务
分享
update kc a
set a.kc_cw=(select b.kc_cw1
from kc1 b
where a.kc_plbh = b.kc_plbh1
and a.kc_zh = b.kc_zh1 )
where exists(select * from kc1 c where a.kc_plbh = c.kc_plbh1 and a.kc_zh = c.kc_zh1 and a.kc_cw <> c.kc_cw1)
update kc a
set a.kc_cw=(select b.kc_cw1
from kc1 b
where a.kc_plbh = b.kc_plbh1
and a.kc_zh = b.kc_zh1 b.kc_cw is not null)
where a.kc_cw<>b.kc_cw1
update kc a
set a.kc_cw=(select b.kc_cw1
from kc1 b
where a.kc_plbh = b.kc_plbh1
and a.kc_zh = b.kc_zh1 )
where exists(select * from kc1 c where a.kc_plbh = c.kc_plbh1 and a.kc_zh = c.kc_zh1 and a.kc_cw <> c.kc_cw1)
update kc a
set a.kc_cw=(select b.kc_cw1
from kc1 b
where a.kc_plbh = b.kc_plbh1
and a.kc_zh = b.kc_zh1 )
where a.kc_cw<>c.kc_cw1