How do I combine 2 tables?

S

sabow71

I have 2 tables in a database. Each table has 1 data field, "Slot", in common
with the other.

How do I create a new table or query that combines data in one table with
data in the other table based on the slot number? In other words I have the
following information:

Table 1 Table 2
A 1 2 3 4 A 4 7 2 9
B 3 5 1 3 B 4 9 1 2
C 0 7 8 3 C 5 1 4 2

Where the capital letter is the data for the slot field, the desired result
is a new table or query that looks like this:

Table 3
A 1 2 3 4 4 7 2 9
B 3 5 1 3 4 9 1 2
C 0 7 8 3 5 1 4 2

I am new to this so please be detailed. Thanks
 
J

Jeff Boyce

Create a new query in design view.

Add Table1.

Add Table2.

Drag "Slot" from Table1 to Table2. This "joins" them.

Select the fields from Table1 you wish to display.

Select the fields from Table2 you wish to display.

Run the query.

(if you have questions about how to use a query, check Access HELP.)

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

Jerry Whittle

The actual table and field names would help us to help you.

Also are the numbers all in one field or each in their own field?

Can there be more than one record with the same slot in each table? In other
words, could 'table1' have more than one record with slot A?
 
S

sabow71

Table 1 is called Positions. Table 2 is called Personnel. The slot field is a
unique identifier in each table. Each character in the sample tables I gave
in my opening post represents a data field. So I want to create a new table
that takes record slot A in Table 1 and combines it with record slot A in
Table 2 (see Table 3).
 

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