I have two tables with same fields (ID, Date, Time, Field1, Field2, ...).
Table1 is with all data, and Table2 with only newest data.
Then you almost certainly have a misdesigned set of tables. Storing the same
data redundantly in two tables Is A Bad Idea.
How to copy just missed rows from Table2 to Table1 (missed ID).
Thenks!
INSERT INTO Table1 (ID, [Date], [Time], Field1, Field2, ...)
SELECT Table2.ID, Table2.[Date], Table2.[Time], Table2.Field1,
Table2.Field2...
FROM Table2 LEFT JOIN Table1
ON Table2.ID = Table1.ID
WHERE Table1.ID IS NULL;
This "frustrated outer join" query will select all records in Table2 which do
not have a match in Table1 (joining on ID), and append them into Table1.
Note that Date and Time are reserved words and should not be used as
fieldnames, and that an Access Date/Time value stores both date and time data
in a single value; it's usually best to take advantage of that fact and
combine your date and time fields into one appropriately-formatted date/time
field.
John W. Vinson [MVP]