规格查找

mac2022-06-30  22

--库存拉链类规格与规格档案的规格不相同的记录.CSVselect md.mdmodel from model ,( select f.code as code,s.model as mdmodel from stock s ,mmf f , model m where s.matid=f.matid and substring(f.code,1,1)='Q' and s.qty>=1 and s.mpsid='' unionselect f.code as code,s.model as mdmodel from stock s ,mmf f , model m where s.matid=f.matid and substring(f.code,1,1)='Q' and s.qty>=1 and s.mpsid='' ) as mdwhere model.name!=md.mdmodelunionselect md.mdmodel from model ,( select f.code as code,s.model as mdmodel from stock s ,mmf f , model m where s.matid=f.matid and substring(f.code,1,1)='Q' and s.qty>=1 and s.mpsid='' unionselect f.code as code,s.model as mdmodel from stock s ,mmf f , model m where s.matid=f.matid and substring(f.code,1,1)='Q' and s.qty>=1 and s.mpsid='' ) as mdwhere model.name!=md.mdmodel

按仓库的需求。 

转载于:https://www.cnblogs.com/myitworld/archive/2008/04/21/2214887.html

最新回复(0)