Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

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