Combine all the data from two tables
If you want to combine all of the data from two tables that have similar but not identical data — such as two lists (tables) of customers that each have different information (fields) for each customer, and each list has some customers that aren't included on the other list — you can create a query that includes all of the customers. This type of query is called a full outer join. Learn about full outer joins.
- In Microsoft Query, create a query and add both tables to it.
- Join a field that matches between the two tables (for example, the Customer ID field in two customer lists) by dragging the field in the first table to the second table.
Choose a field that has information for every record in each table. For example, if two customer lists have matching Customer ID fields, join the Customer ID field.
- Double-click the join line between the two tables.
- In the Joins dialog box, click option 2, click Add, and then click Close.
- Add the fields that you want to the query.
- On the View menu, click SQL.
- Select the data in the SQL statement box, press CTRL+C to copy it, and then click OK.
- Double-click the join line again.
- In the Joins dialog box, click option 3, click Add, and then click Close.
- On the View menu, click SQL.
- Click at the end of the data in the SQL statement box, press ENTER, type the capitalized word UNION and then press ENTER again.
- Press CTRL+V to paste the copied information after the word UNION.
- Click OK, and when prompted that the query can't be displayed graphically, click OK again.