sqlsamurai
Programmer
How would I consolidate these three statements? The only difference is one of the fields in the WHERE statements. I'm using SQL Server 2005 if that makes any difference.
Thanks
Code:
SELECT Inventory.*, Products.IjoistTypeID
FROM Products INNER JOIN Inventory ON Products.ProductID = Inventory.ProductID
WHERE (((Inventory.PurchaseOrderID)=" & al_MasterID & ") AND ((Products.LumberTypeID)=3))
Code:
SELECT Inventory.*, Products.IjoistTypeID
FROM Products INNER JOIN Inventory ON Products.ProductID = Inventory.ProductID
WHERE (((Inventory.ProductionID)=" & al_MasterID & ") AND ((Products.LumberTypeID)=3))
Code:
SELECT Inventory.*, Products.IjoistTypeID
FROM Products INNER JOIN Inventory ON Products.ProductID = Inventory.ProductID
WHERE (((Inventory.ReturnID)=" & al_MasterID & ") AND ((Products.LumberTypeID)=3))
Thanks