I have the following query:
which produces the intended calculation except in instances where there is no data (NULL) for "Qty". Can someone please help me produce the calculation in these cases (i.e. Qty should revert to a zero in the case of null).
Thanks
Code:
SELECT [Inventory Transactions].TransactionDescription, Products.ProductName, [Inventory Transactions].UnitsReceived, [UnitsReceived]-[Qty] AS QtyAvail, qryCompOut.Qty
FROM Products INNER JOIN (qryCompOut RIGHT JOIN [Inventory Transactions] ON qryCompOut.comp = [Inventory Transactions].TransactionDescription) ON Products.ProductID = [Inventory Transactions].ProductID
GROUP BY [Inventory Transactions].TransactionDescription, Products.ProductName, [Inventory Transactions].UnitsReceived, [UnitsReceived]-[Qty], qryCompOut.Qty
HAVING ((([Inventory Transactions].UnitsReceived)>0));
which produces the intended calculation except in instances where there is no data (NULL) for "Qty". Can someone please help me produce the calculation in these cases (i.e. Qty should revert to a zero in the case of null).
Thanks