I have 2 tables
First Table: If you notice the Rows are repeated for some of the IDs. If an ID is associated to multiple ROLES, each ROLE will have a separate entry with the ID
| ID | Role |
| 100 | BUSVF |
| 100 | BUSMK |
| 100 | BUSVWR |
| 101 | BUSMK |
| 102 | BUSVWR |
| 103 | MIGVF |
| 103 | MIGMK |
Second Table: This is the Toxic Role Rules Table
| Valid_Role | Toxic_Role |
| BUSVF | BUSMK |
| MIGVF | MIGMK |
How to read this rules table --
An ID having BUSVF should not also have BUSMK
An ID having MIGVF should not also have MIGMK
Therefore, I would need to compare the second table with the first table and throw exceptions where the Toxic Rules Table match
For example consider ID 100 in the first table.
ID 100 has roles BUSVF, BUSMK, BUSVWR
The toxic rules table states that an ID having BUSVF should not also have BUSMK. Therefore, ID 100 is an exception.
How do I go about achieving this ?