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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access query to combine tables 1

Status
Not open for further replies.

phjames

IS-IT--Management
May 25, 2010
6
GB

Hi,

Thanks for reading my post. I'd like some Access advice please.

I have 2 tables.

Table 1 has fields inventory, item_no, common_item_no
Table 2 has fields Res_qty, item_no

item_no is the unique identifier between tables.

I would like inventory and res_qty adding together and put into a new 3rd table with these fields item_no, common_item_no.

I hope this makes sense and thanks for any replies or pointers.

James.

 



So did you try a query joining the two tables on item_no?

If it looks good, make it a MakeTable query. But why bother with this step?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
phjames,

For future reference, questions about Access Queries should go here:
forum701
 
You don't need a 3rd table.
Just link the tables in a SELECT query.
Code:
SELECT table1.item_no, common_item_no, inventory + res_qty AS total_inventory 
FROM table1
INNER JOIN table2
ON table1.item_no = table2.item_no

Randy
 


echoing in here ;-)

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 


Hi,

Thanks for the replies. I linked the tables like randy700 suggested.

Thanks,
James.
 


ROFL: Me 2!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top