Need Query help!!!!

T

TyF

I have an inventory table. The table consist of location, product, tons,
weight, request date, pick up date, product price and invoiced.

I would like to create a query that would group the product by location: I
need the following:
Total Tons
Total Weight
Total Price
That why I can enter payment information by location not by individual
product.
 
M

Michel Walsh

In SQL view:


SELECT product, location, SUM(tons), SUM(weight), SUM(price)
FROM yourTable
GROUP BY product, location


where you use your real fields name and your real table name. Note that you
can also use expressions like



SUM( weight * unitPrice )



if this is appropriate, in the list following the SELECT key word, as
example.



Vanderghast, Access MVP
 
T

TyF

It's working so far.

Michel Walsh said:
In SQL view:


SELECT product, location, SUM(tons), SUM(weight), SUM(price)
FROM yourTable
GROUP BY product, location


where you use your real fields name and your real table name. Note that you
can also use expressions like



SUM( weight * unitPrice )



if this is appropriate, in the list following the SELECT key word, as
example.



Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top