M
Michael
I have asked this in reports, but now it is more of a query problem (I
think)
I have a query that pulls all the orders and order details. In each row I
have a orderdetailID and a product. I need to get the total weight of
esigenza for each product. I have the query below, but this gives me a list
of the product but not totals of the weights. I am sure this is not the most
effective way to make a list of all the products totals. The way I have done
it now, I must make a query for each product. Is there a better way?
Thank you
Michael
I currently have this sql in a query
SELECT [order details query].Esigenz, [order details query].Prodotto
FROM [order details query]
GROUP BY [order details query].Esigenz, [order details query].Prodotto
HAVING ((([order details query].Prodotto)="Latt.Verde")) OR ((([order
details query].Prodotto)="Latt.Verde (L)"));
This is what I would like
OrderDetailID product cases pallets casesperrow netwgt Esigenza
1 Cherries 88 5 8 125gr 440
2 Cherries 88 5 8 125gr 440
3 Apples 88 6 8 125gr 528
4 Cherries 88 4.5 10 125gr 495
Cherries total 1375 kg
Apple total 528 kG
think)
I have a query that pulls all the orders and order details. In each row I
have a orderdetailID and a product. I need to get the total weight of
esigenza for each product. I have the query below, but this gives me a list
of the product but not totals of the weights. I am sure this is not the most
effective way to make a list of all the products totals. The way I have done
it now, I must make a query for each product. Is there a better way?
Thank you
Michael
I currently have this sql in a query
SELECT [order details query].Esigenz, [order details query].Prodotto
FROM [order details query]
GROUP BY [order details query].Esigenz, [order details query].Prodotto
HAVING ((([order details query].Prodotto)="Latt.Verde")) OR ((([order
details query].Prodotto)="Latt.Verde (L)"));
This is what I would like
OrderDetailID product cases pallets casesperrow netwgt Esigenza
1 Cherries 88 5 8 125gr 440
2 Cherries 88 5 8 125gr 440
3 Apples 88 6 8 125gr 528
4 Cherries 88 4.5 10 125gr 495
Cherries total 1375 kg
Apple total 528 kG