----ִĽűȥѯ3ûУиݲѯĽȥڳڳк

------ к


SELECT I.Qty ,a.QTY к,p.UserCode Ʒ,p.FullName Ʒ,s.FullName ֿ FROM  IniGoodsStocks AS I,#A AS A,ptype as p,Stock as s WHERE I.PRec=A.Prec AND I.KRec=A.KRec and i.PRec=p.rec and i.KRec=s.rec
AND I.SNUniqueid=A.SNUniqueid AND I.Qty<>A.QTY





----- Ʒкڿв


select p.UserCode Ʒ,p.FullName Ʒ,s.FullName from #a  as a,ptype as p,Stock as s where a.SNUniqueid not in (select SNUniqueid from  INIGoodsStocks) AND  A.PRec=P.rec AND A.KRec=S.Rec



---- ܹкŵƷп浫ûк


select p.UserCode Ʒ,p.FullName Ʒ,s.FullName from INIGoodsStocks  as a,ptype as p,Stock as s where a.SNUniqueid not in (select SNUniqueid from  SNList) AND  A.PRec=P.rec AND A.KRec=S.Rec and p.Flags>='3221225472'