kaiwanlin

update YF_MZFYZD set jjje=tbl.jjje from (select a.xh,sum(b.jjje) jjje from YF_MZFYZD a(nolock),YF_MZFYMX b(nolock)
 where a.xh=b.fyxh group by a.xh) tbl,YF_MZFYZD x where tbl.xh=x.xh and isnull(x.jjje,0)=0

分类:

技术点:

相关文章: