spike_access
New member
- Local time
- Today, 13:40
- Joined
- Mar 22, 2022
- Messages
- 14
Hi all,
I've been browsing through the forum and found loads of examples on how to remove duplicates, but I haven't found a solution that applies to my scenario. If it is out there I apologize if making any unnecessary posting. Could of course be my lack of understanding the posts as well...
Background
I have a table (tblQMs) which is updated on a daily basis with a report that contains additive data, and in some cases duplicated data.
The main fields used are titleID, Audio, Sub. All values in Audio and Sub is comma separated.
I know that the structure isn't the preferred (using comma separated values) but it is what I have to live with as it is how the source system provides the reports, also taking into account that it is not a defined set of possible values, it could be any language code in the world.
The update of tblQMs is performed by a report being imported into a temp table (tblQMs_Updates) from which, either, records are appended to tblQMs or values added to existing records (Audio/Sub).
Issue
The part of updating the tblQMs is all resolved. The challenge now is to "clean out" duplicates in the fields Audio and Sub after the update.
The table contains thousands of records and is an ever growing table with new records added on a daily basis and there is no form from which I can trigger a function to clean out duplicated values on a record per record basis. I basically need code that, post-update, will clean the data.
Any alternative solution pre-update would of course also be welcome if deemed a much better solution!
Example data
In the above examples;
titleID 156324 should have one en-US removed from the Audio field and one pt-PT removed from the Sub field
titleID 163254 should have one en-US and one se-SV removed from the Sub field.
I have been working with Access and VBA to some extent but all self-learned so there are definitely gaps in my knowledge, most likely even with the basics so please bear with me.
Any help or direction would be much appreciated.
Best
I've been browsing through the forum and found loads of examples on how to remove duplicates, but I haven't found a solution that applies to my scenario. If it is out there I apologize if making any unnecessary posting. Could of course be my lack of understanding the posts as well...
Background
I have a table (tblQMs) which is updated on a daily basis with a report that contains additive data, and in some cases duplicated data.
The main fields used are titleID, Audio, Sub. All values in Audio and Sub is comma separated.
I know that the structure isn't the preferred (using comma separated values) but it is what I have to live with as it is how the source system provides the reports, also taking into account that it is not a defined set of possible values, it could be any language code in the world.
The update of tblQMs is performed by a report being imported into a temp table (tblQMs_Updates) from which, either, records are appended to tblQMs or values added to existing records (Audio/Sub).
Issue
The part of updating the tblQMs is all resolved. The challenge now is to "clean out" duplicates in the fields Audio and Sub after the update.
The table contains thousands of records and is an ever growing table with new records added on a daily basis and there is no form from which I can trigger a function to clean out duplicated values on a record per record basis. I basically need code that, post-update, will clean the data.
Any alternative solution pre-update would of course also be welcome if deemed a much better solution!
Example data
titleID | Audio | Sub |
123456 | en-US, pt-PT | en-US, pt-PT, ro-RO, hu-HU |
156324 | en-US, hu-HU, en-US | en-US, pt-PT, bg-BG, pt-PT, se-SV |
163254 | en-US | en-US, se-SV, en-US, se-SV, no-NO, pl-PL |
In the above examples;
titleID 156324 should have one en-US removed from the Audio field and one pt-PT removed from the Sub field
titleID 163254 should have one en-US and one se-SV removed from the Sub field.
I have been working with Access and VBA to some extent but all self-learned so there are definitely gaps in my knowledge, most likely even with the basics so please bear with me.
Any help or direction would be much appreciated.
Best