how to handle the duplicate records on the table