Hi,
I have a query that adds stockin in one expression and adds stockout in another:
SELECT t_product.Product_ID, t_product.Product_Name, Sum([t_acq_detail]![Quantity]) AS StockIn, Sum([t_invoice_detail]![Quantity]) AS StockOut, ([StockIn]-[StockOut]) AS StockAvailable
FROM (t_product INNER JOIN t_acq_detail ON t_product.Product_ID=t_acq_detail.Product_ID) INNER JOIN t_invoice_detail ON t_product.Product_ID=t_invoice_detail.Product_ID
GROUP BY t_product.Product_ID, t_product.Product_Name;
This only shows stock where both sets of queries match. How do I write or do a query to show stock where it may have come in (stock in) but not out?
Is this an issue with my relationship joins or something else?
Thanks
I have a query that adds stockin in one expression and adds stockout in another:
SELECT t_product.Product_ID, t_product.Product_Name, Sum([t_acq_detail]![Quantity]) AS StockIn, Sum([t_invoice_detail]![Quantity]) AS StockOut, ([StockIn]-[StockOut]) AS StockAvailable
FROM (t_product INNER JOIN t_acq_detail ON t_product.Product_ID=t_acq_detail.Product_ID) INNER JOIN t_invoice_detail ON t_product.Product_ID=t_invoice_detail.Product_ID
GROUP BY t_product.Product_ID, t_product.Product_Name;
This only shows stock where both sets of queries match. How do I write or do a query to show stock where it may have come in (stock in) but not out?
Is this an issue with my relationship joins or something else?
Thanks