How to fix Duplicate Records in table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2024 08:59 AM
In TRM Products Table, I have some bad data.
Ex: There are 3 records with same name and same owner but different TRM phases
If a product name - A has owner - X and its TRM phase is Approved and the other two records have same name same owner but the Phase is Evaluation. Now, I want to keep the record with Phase - Approved and make Phase Evaluation to Active - False i.e., other two records.
If a product name - A has owner - X and its TRM phase is Evaluation and the other two records also have same name same owner and the same Phase as Evaluation then No need to change anything.
I just want to change Active true to false only in first scenario.
I want to write a fix script to fix the issue. I have written code wherein it is taking all the records in the table and making the next record as inactive based iteration. Please suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2024 10:04 AM
Hello @Sowjanya Jangam ,
Please try with below code. Update the code as per your requirement wherever I have mentioned in comments.