How to Union Query Three Tables in Access
If you need to combine two or more tables that include similar records in a Microsoft Access database, a union query can help. The data in the combined tables is displayed once even if each table includes the same data, so you end up with one main query that you can use to generate a report. You can use Structured Query Language, or SQL, to create a union query in SQL view.
Instructions
-
-
1
Open the database you want to modify in Access.
-
2
Click the "Create" tab in the ribbon and select "Query Design" from the "Other" group.
-
-
3
Double-click the three tables that you want to combine from the "Show Table" dialogue box and click "Close." The tables are added to the background in "Design" view.
-
4
Click the "Design" tab. Select "View" and "SQL View" from the "Results" tab. Use the following syntax to create your union query for the three tables:
SELECT fieldname1, fieldname2, etc.
FROM Table1
UNION SELECT fieldname1, fieldname2, etc.
FROM Table2
UNION SELECT fieldname1, fieldname2, etc.
FROM Table3
UNION SELECT fieldname1, fieldname2, etc.
-
5
Replace "fieldname1" and "fieldname2" with the column names for the three tables. Replace "Table1," "Table2" and "Table3" with the names of the three tables in the union.
-
6
Click "Run" under the "Results" from the "Design" tab.
-
1