Duplicate issues

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