It has been settled daily, but the real-time inventory of the corresponding product is inconsistent with the inventory quantity in the product summary

 use hbposev9_branch
go
select * into t_rm_daysum20160728 from t_rm_daysum where pre_qty<>(sale_qty+giv_qty-ret_qty) and other1='1'
update t_rm_daysum set sale_qty=pre_qty where  pre_qty<>(sale_qty+giv_qty-ret_qty) and other1='1'
go

Guess you like

Origin blog.csdn.net/szlixiaolong/article/details/109216350