I have a table that is updated from an excel import.
The problem is to identify any new records that have been added since the last update. It is easy to identify records that have the same key value, but how do you identify the new ones?
It would be good if I had, but unfortuneately I have no control over the source data.
The table has an autonumber ID with related data in other tables, so I can't do a complete new import or I would create orphan records in the other tables.
I could loop through the new and old tables for items that don't match, but I seem to remember that this can be done using access - rather than code.
I may be wrong, but I think PHV may have been asking if you have the DateTime field as part of the table the records are being added to. If so (or if added), the newly added records will have the current date and time automatically put into that field.
Let them hate - so long as they fear... Lucius Accius
this will only work before you do the import, so don't know if it's feasable to setup a temp table to import into, and the process the data from the temp table...
anyway...
Select * from Table1 where Table1.PK not in (
select Table2.PK from Table2
)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.