Add to current table when updating CSV-linked table

T

Tommy

I have two tables that are linked tables from two CSV files. These two
tables get merged into one via a union query, a few fields are added
and eventually a main table of all the records is created with an auto-
numbered primary key. The data from the two CSV files comes in daily
and I would like to add the data from each day to the end of the main
table with the primary key when I update rather than have all the
records replaced. Ideally the new records would be added to the end so
that the auto-number can still sort it all uniquely. How could I do
this?

Regards,

Tom
 
J

John W. Vinson

I have two tables that are linked tables from two CSV files. These two
tables get merged into one via a union query, a few fields are added
and eventually a main table of all the records is created with an auto-
numbered primary key. The data from the two CSV files comes in daily
and I would like to add the data from each day to the end of the main
table with the primary key when I update rather than have all the
records replaced. Ideally the new records would be added to the end so
that the auto-number can still sort it all uniquely. How could I do
this?

How can you identify which records in the input file are new and which are
old, given that they don't contain the autonumber value? Will you need to
worry about *updating* old records which might have changed in only one or two
fields? How about records which have been deleted in the CSV files?

This can be a lot trickier than it appears!

John W. Vinson [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