Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GROUP BY

Status
Not open for further replies.

moernoo

Technical User
Nov 8, 2008
4
BE
Hi,

I have the following tables:

Tabel 1: "Parts:"

PartID | PartCost
------------------
1 | 0.5
2 | 0.3


Tabel 2: "ConsumedParts"

PartID | Quantity
------------------
1 | 1
1 | 2
2 | 1


Now, i would like to become a table like underneath, that summarizes all parts which are the same and calculate the total cost per part:

PartID | Quantity | RegelPrijs
-------------------------------
1 | 3 | 1.5
2 | 1 | 0.3


Who can help me please?

Thanks in advance
 
You'll need a query for this. Open the Query Designer, add the two tables and link the two PartID fields by dragging one to the other (the link may already be there). Then drag the fields that you want to the grid. Type Quantity*PartCost as a new column to calculate the price.

Hope that's enough to get you started.

Geoff Franklin
 
Hi,

thanks, that multiplication has gotten me started.

Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top