Merge更新

--更新税率
merge into Ct_Fpp_Expstmtexpentrys ta
using (
select t1.fid,t2.cftaxrate
from Ct_Fpp_Expstmtexpentrys t1 
inner join ct_fpp_applybillvchentry t2 on t2.fid=t1.cfvchentryid
where t1.cftaxrate is null
) tb
on (ta.fid=tb.fid)
when matched then
update set ta.cftaxrate=tb.cftaxrate

 

posted @ 2020-02-25 11:21  DuoMi  阅读(74)  评论(0)    收藏  举报