how to merge two tables in an access database

R

Rathin

I have 2 tables for annuity payments. I like to merge data from one to other
keeping all the extra data in table 1 compared to table 2 against a common
field 'annuitant_name'. Also the new names should be in the merged table.
Please help by giving the SQL command. I am a beginner in Access and VB so
please advise in common parlance.
 
K

KARL DEWEY

Try these queries --
qry_annuitant_List --
SELECT [annuitant_name]
FROM Table1
UNION SELECT [annuitant_name]
FROM Table2;

SELECT Table1.*, Table2.* INTO Table3
FROM qry_annuitant_List LEFT JOIN Table1 ON
(qry_annuitant_List.[annuitant_name] = Table1.[annuitant_name]) AND
qry_annuitant_List.[annuitant_name] = Table2.[annuitant_name];
 

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