update d set d.fdetailcount=v.fcount from t_ItemDetail d, (select fdetailid,count(*) fcount from t_ItemDetailv where fitemid=-1 group by fdetailid ) v where d.fdetailid=v.fdetailid go
update d set d.fdetailcount=v.fcount from t_ItemDetail d, (select fdetailid,count(*) fcount from t_ItemDetailv where fitemid=-1 group by fdetailid ) v where d.fdetailid=v.fdetailid
|