STEVEGARDNER
New member
- Local time
- Today, 08:02
- Joined
- Dec 4, 2008
- Messages
- 4
I have built a query from 2 tables tblPlannedOrders and tblPurchase Orders, the aim of the query is to show how much has been ordered against the planned amount from the budget.
The query works only if something has been ordered against the Planned Order number, if there has been no order the Planned Order Number is not showing.
Is there any way I can get the query to show all planned orders, and if no order has come through yet, for that value to show as a 0... my aim is to show a total overview of what has been ordered versus plan.
Here is the query SQL (which i don't understand!) in case this helps.
SELECT tblPlannedOrders.[Order No], tblPlannedOrders.[Project Name], tblPlannedOrders.Value, Sum(tblPurchaseOrders.Total) AS SumOfTotal
FROM tblPlannedOrders INNER JOIN tblPurchaseOrders ON tblPlannedOrders.[Order No] = tblPurchaseOrders.[Purchase Order No]
GROUP BY tblPlannedOrders.[Order No], tblPlannedOrders.[Project Name], tblPlannedOrders.Value
ORDER BY tblPlannedOrders.[Order No];
Thanks in advance
Steve
The query works only if something has been ordered against the Planned Order number, if there has been no order the Planned Order Number is not showing.
Is there any way I can get the query to show all planned orders, and if no order has come through yet, for that value to show as a 0... my aim is to show a total overview of what has been ordered versus plan.
Here is the query SQL (which i don't understand!) in case this helps.
SELECT tblPlannedOrders.[Order No], tblPlannedOrders.[Project Name], tblPlannedOrders.Value, Sum(tblPurchaseOrders.Total) AS SumOfTotal
FROM tblPlannedOrders INNER JOIN tblPurchaseOrders ON tblPlannedOrders.[Order No] = tblPurchaseOrders.[Purchase Order No]
GROUP BY tblPlannedOrders.[Order No], tblPlannedOrders.[Project Name], tblPlannedOrders.Value
ORDER BY tblPlannedOrders.[Order No];
Thanks in advance
Steve