Hi All,
I was wondering if anyone might be able to help me with a solution for this.
I have an Excel/Access system that I've created for work. I work in the motor insurance industry and we receive a weekly submission from one of our suppliers which can contain new records and updates to existing records.
I paste all of the data into a Linked Table (lets call it MyLinkedTable for example) and so that table automatically updates in to Access.
I need help with an SQL query to loop through the entries in MyLinkedTable and if they already exist (using the CaseRef field as a unique identifier) then the data for that row in MyTable is overwritten by the data in MyLinkedTable.
If it doesn't exist in MyTable, then it appends it to the MyTable table.
MyLinkedTable and MyTable structure - both identical
- ID
- CaseRef
- PH_Name
- UpdateDate
- CaseStatus
- DateLitigated
- HandlerName
- HandlerEmail
- ManagerName
- ManagerEmail
I can do the update query without an issue:
What I can't work out is how to make it check to see if the CaseRef already exists in MyTable and if it doesn't, then to add it as a new row. Any help would be greatly appreciated.
Many Thanks
Bookmarks