Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

ms access query calculate price

I have a parts table that has the guage of metal and type of metal to make a part.  I have a cost table that has costs which is dependent on guage and type.

Parts Table:
Parts    GA   Type
A1         12    H
A2          10    G

Cost Table:
Type  GA  Cost
H         07     1.25
H         10     1.00
H         12     0.75
G         07     1.50
G . . . . .

What is the best way to calculate the cost for each part - (I thought about a subselect query but have not done many)

Thanks for any help with this.
0
johnmadigan
Asked:
johnmadigan
3 Solutions
 
Gustav BrockCIOCommented:
Bring the two table into a query in design view.
Create inner joins between GA and between Type of the two tables.

/gustav
0
 
derekkrommCommented:
select p.Type, p.GA, c.Cost from Parts p inner join Cost c on p.Type = c.Type and p.GA = c.GA
0
 
Paul_Harris_FusionCommented:
Create a query as follows:

Select P.Parts,  C.Cost
FROM
[Parts Table] P Inner Join [Cost Table] C
on P.GA = C.GA and P.[Type] = C.[Type]
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now