In two tables in my database there are duplicate data. I found the root cause of the problem and working on fixing what is causing the issue. I need to delete the duplicate data. There are three tables that join together.
Person, Employee, Login
What I need to do is delete the duplicate data.
First, if the person has a login I want to keep that record and delete the duplicate.
Second, if the person does not have a login I just want to delete one of the records.
The duplicates exist in the Person and Employee table.
So for person table
John smith 101
John smith 102