Duplicate issues

S

Syd

How can I do an append query appending only records for
which there are no matching records in the target table?
The originating table has a field called: dteDayOfMnth

Target table is called: tbl_CurDates the target field is a
dteCurDate.

Any assistance will be appreciated.

Thanks,
 
M

Michel Walsh

Hi,


I would say, as usual...


INSERT INTO oldTable( list of fields)
SELECT (list of fields) FROM updatingDataTable LEFT JOIN tableToCompareWith
ON updatingDataTable.FieldName = tableToCompareWith.ComparedField
WHERE tableToCompareWith.PrimaryKeyField Is Null


The SELECT statement is like the one that would produce the query wizard about finding unmatched
record. You transform the query obtained by the Wizard into an append query (through the menu or
the toolbar).


Hoping it may help,
Vanderghast, Access MVP.
 

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