Good morning.
I have put together an import VBA that imports a text file and drops it into a table. There are 10 fields that I am importing and I have the primary key set on five fields to prevent duplicates from being imported.
Everything is working fine with the exception of what I want done with duplicate data.
The primary keys I have set do in fact prevent duplicates, but there are situations where I want the most recent records I am importing to replace the older records.
The data I am importing are new credit cards booked. Occassionally a cardholder will lose or have their card compromised in which case a new card is issued. In this case nine out of the ten fields match with what I already have (the card number being the only field that doesn't match).
What I want to do is have the most recent data, with the new card number, replace the data already on the table.
Is this something I could build into an update or an append query?
Thanks for your help.
I have put together an import VBA that imports a text file and drops it into a table. There are 10 fields that I am importing and I have the primary key set on five fields to prevent duplicates from being imported.
Everything is working fine with the exception of what I want done with duplicate data.
The primary keys I have set do in fact prevent duplicates, but there are situations where I want the most recent records I am importing to replace the older records.
The data I am importing are new credit cards booked. Occassionally a cardholder will lose or have their card compromised in which case a new card is issued. In this case nine out of the ten fields match with what I already have (the card number being the only field that doesn't match).
What I want to do is have the most recent data, with the new card number, replace the data already on the table.
Is this something I could build into an update or an append query?
Thanks for your help.