R
Rpettis31
I have a query and for some reason when I run it my value on my forecast
field is doubled. So if there is a value for a month of 11,000 when I run
the query the value shows as 22,000. It does not do this on all the lines so
I am not sure what I am doing wrong.
SELECT tblInventoryTEST.Item, tblInventoryTEST.Reason,
Sum(tblForecasts.[avail-qty]) AS [SumOfavail-qty], tblInventoryTEST.Netting,
tblInventoryTEST.OnPO, ([Netting]+[OnPO])-Sum([orig-qty]) AS Balance
FROM (tblForecasts INNER JOIN tblInventoryTEST ON tblForecasts.item =
tblInventoryTEST.Item) INNER JOIN tblOpenPOs ON tblInventoryTEST.Item =
tblOpenPOs.Item
WHERE (((tblForecasts.[fcst-date])=#3/1/2009#) AND ((tblOpenPOs.[Due
Dt])>#2/1/2009#))
GROUP BY tblInventoryTEST.Item, tblInventoryTEST.Reason,
tblInventoryTEST.Netting, tblInventoryTEST.OnPO
HAVING (((tblInventoryTEST.Item) Not Like "DI-*"));
field is doubled. So if there is a value for a month of 11,000 when I run
the query the value shows as 22,000. It does not do this on all the lines so
I am not sure what I am doing wrong.
SELECT tblInventoryTEST.Item, tblInventoryTEST.Reason,
Sum(tblForecasts.[avail-qty]) AS [SumOfavail-qty], tblInventoryTEST.Netting,
tblInventoryTEST.OnPO, ([Netting]+[OnPO])-Sum([orig-qty]) AS Balance
FROM (tblForecasts INNER JOIN tblInventoryTEST ON tblForecasts.item =
tblInventoryTEST.Item) INNER JOIN tblOpenPOs ON tblInventoryTEST.Item =
tblOpenPOs.Item
WHERE (((tblForecasts.[fcst-date])=#3/1/2009#) AND ((tblOpenPOs.[Due
Dt])>#2/1/2009#))
GROUP BY tblInventoryTEST.Item, tblInventoryTEST.Reason,
tblInventoryTEST.Netting, tblInventoryTEST.OnPO
HAVING (((tblInventoryTEST.Item) Not Like "DI-*"));