There are 5 columns in my table structure and they are:
1) Id - PK
2) Name
3) IdentityNo1
4) IdentityNo2
5) PassportNo
Since duplicate records are inserted into the table I am
attempting to remove the duplicate records. What makes
the records unique is the IdentityNo1, IdentityNo2 and
Passport column. However since there are duplicates so
the records are not unique. For example:
1, John, E6788, A9383 , null
2, James, null, null, E8364
3, John, E6788, A9383 , null
4, John, E6788, A9383 , null
5, James, null, null, E8364
The example above shows the record with Id (1, 3 and 4)
and (2, 5) have the same IdentityNo1. IdentityNo2 and
PassportNo. So now I intend to remove record 1, 3 and
keep record 4. I intend to remove record 2 and keep
record 5. Why record 4 and 5? It's because the records
are the last records and considered to be the latest.
Is there a way to implement this concept.