SELECT dbo.CBO_Category_Trl.combinename as 分类,dbo.InvTrans_TransLine.COSTUOMQTY AS 数量,dbo.CBO_Wh_Trl.name as 仓库 FROM [dbo].[InvTrans_TransLine] left join dbo.CBO_ItemMaster on dbo.CBO_ItemMaster.id=dbo.InvTrans_TransLine.iteminfo_itemid left join dbo.CBO_Category_Trl on dbo.CBO_ItemMaster.mainitemcategory=dbo.CBO_Category_Trl.id left join dbo.CBO_Category on dbo.CBO_Category.id=dbo.CBO_Category_Trl.id left join dbo.Base_Organization_Trl on dbo.Base_Organization_Trl .id=dbo.CBO_Category.org left join dbo.CBO_Wh_Trl on dbo.CBO_Wh_Trl.id=dbo.InvTrans_TransLine.wh where dbo.Base_Organization_Trl.name='宁波培源股份有限公司' and dbo.CBO_Wh_Trl.name='辅料仓' /*and YEAR(GETDATE()) = YEAR(dbo.InvTrans_TransLine.CREATEDON) AND MONTH(GETDATE()) = MONTH(dbo.InvTrans_TransLine.CREATEDON)*/ and dbo.InvTrans_TransLine.docno like '%RCV%' or dbo.InvTrans_TransLine.docno like '%MiscRcv%' or dbo.InvTrans_TransLine.docno like '%TranIn%' or dbo.InvTrans_TransLine.docno like '%Borrow%' or dbo.InvTrans_TransLine.docno like '%WG%' where dbo.CBO_Wh_Trl.name='辅料仓' 已经加了这条件为什么还是会显示其他仓库信息 |