R
Richard Horne
I have a query for which the SQL code is:
SELECT Deliveries.DeliveryNoteID, Deliveries.OrderNumber,
Delivery_Details.ItemNumber, Delivery_Details.QtyDelivered,
Delivery_Details.DeliveryDate
FROM Deliveries INNER JOIN Delivery_Details ON Deliveries.DeliveryNoteID =
Delivery_Details.DeliveryNoteID
WHERE (((Deliveries.OrderNumber)=[Forms]![Deliveries]![OrderNumber]));
The results look something like:
The columns are DeliveryNoteID OrderNumber, ItemNumber, QtyDelivered,
DeliveryDate
2 76 1 50 17/02/2005
2 76 2 2000 17/02/2005
4 76 1 2000 17/02/2005
4 76 2 2500 17/02/2005
8 76 2 500 18/02/2005
How can I get this query so that Item numbers are grouped together and the
sum of QtyDelivered for each item number is displayed? I want to do this
because I want to compare the total number for each item delivered with the
original number ordered so I can calculate the remaining quantity.
SELECT Deliveries.DeliveryNoteID, Deliveries.OrderNumber,
Delivery_Details.ItemNumber, Delivery_Details.QtyDelivered,
Delivery_Details.DeliveryDate
FROM Deliveries INNER JOIN Delivery_Details ON Deliveries.DeliveryNoteID =
Delivery_Details.DeliveryNoteID
WHERE (((Deliveries.OrderNumber)=[Forms]![Deliveries]![OrderNumber]));
The results look something like:
The columns are DeliveryNoteID OrderNumber, ItemNumber, QtyDelivered,
DeliveryDate
2 76 1 50 17/02/2005
2 76 2 2000 17/02/2005
4 76 1 2000 17/02/2005
4 76 2 2500 17/02/2005
8 76 2 500 18/02/2005
How can I get this query so that Item numbers are grouped together and the
sum of QtyDelivered for each item number is displayed? I want to do this
because I want to compare the total number for each item delivered with the
original number ordered so I can calculate the remaining quantity.