Append only new records to a table

D

Dez

I have an append query where I only want records from Table A not found in
Table B to be added to Table B. However, as I have it set up, the query
appends all the records from Table A to Table B. Is there something simple
I'm missing?

Thanks...
 
M

Marshall Barton

Dez said:
I have an append query where I only want records from Table A not found in
Table B to be added to Table B. However, as I have it set up, the query
appends all the records from Table A to Table B.


You need to use an unmatched query (via a query wizard) to
select the records to insert.

INSERT INTO tableB
SELECT tableA.*
FROM tableA LEFT JOIN tableB
ON tableA.PKfield = tableB.PKfield
WHERE tableB.PKfield Is Null
 
D

Dez

That got it... Thanks Marsh!

Marshall Barton said:
You need to use an unmatched query (via a query wizard) to
select the records to insert.

INSERT INTO tableB
SELECT tableA.*
FROM tableA LEFT JOIN tableB
ON tableA.PKfield = tableB.PKfield
WHERE tableB.PKfield Is Null
 

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