Append only new records to a table

  • Thread starter Thread starter Dez
  • Start date Start date
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...
 
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
 
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
 
Back
Top