Joining 2 tables

thegooner

New member
Local time
Today, 00:37
Joined
Oct 25, 2006
Messages
1
Hi

I have an Access database that contains 2 tables. Both of these tables have the same structure and have the same field names. So:

Table 1 Fields :

Name
Address
Telephone
Fax

Table 2 Fields :

Name
Address
Telephone
Fax

Is there a way to write a query, that will show the results of both tables in one go. (None of the information in table 1 is duplicated in table 2 - I want to show all records from both tables in one new table). So, if both tables had 3 records each, the query would return:

Name - Address - Telephone - Fax

jon-uk-12345-54321 (from Table 1)
julie-uk-21451-41541 (from Table 1)
paul-ir-98545-11241 (from Table 1)
pat-uk-99585-63362 (from Table 2)
phil-uk-99985-99631 (from Table 2)
ted-uk-44444-55555 (from Table 2)


These 2 tables need to be kept separate, so I can't copy and paste the records from Table 1 into the bottom of table 2.
The field names are the same in both tables.

Can this be done?

Many Thanks
 
You'll probably have to write a union query to do this. Here is what one may look like:

Code:
SELECT TableA.Field1 As FieldA, TableA.Field2 As FieldB, TableA.Field3
As FieldC
FROM TableA
UNION ALL
SELECT FieldA, FieldB, FieldC
FROM TableB
 

Users who are viewing this thread

Back
Top Bottom