山东长川信息科技有限公司

 0531-55511818 15169050785

商贸版凭证过账时提示名称或代码在系统中已经被使用

发布时间:2020-01-15 14:06

select * from t_itemdetail

exec sp_cleanitemdetailv

GO

update a set a.fdetailcount=b.Fcount

from  t_itemdetail  a  join  (select  Fdetailid,count(*)  as  Fcount  from  t_itemdetailv

where fitemid=-1 group by Fdetailid) b

on a.fdetailid=b.fdetailid  where a.fdetailcount<>b.Fcount

GO

扫一扫在手机上阅读本文章