+ Start a Discussion
Uday KUday K 

how to find the duplicate Accounts (Person Accounts are enabled)

Hello All,


I have duplicate Accounts in my salesforce. How to find the duplicates based on First Name and Last Name through coding or something without using app.

Ex:  Rakesh Roy and Roy Rakesh are duplicates.


Can someone Help me.


Thanks in Advance,



simple example is

list<acount> lst = [select id from account where name like '%Rakesh%'];


// this is simple query for the example given above by you... but you may have a name like Rakesh Raj as a different account name and this will also come in to the duplicate list for this you need to come with up with a strategy to get rid these kind of scenarios

Bhawani SharmaBhawani Sharma
I would go with Kiran. First you need to define your duplicate definition and write logic based on that. Like
Select All the contacts where FirstName Like '%ROY%' OR FirstName like '%RAKESH%' or LastNameName like ' %RAKESH%'........
Uday KUday K



Thanks a ton for reply.


Our salesforce is having duplicates like this.


Ex: Rakesh Roy,

       Roy Rakesh,

       Ramesh Raju,

       Raju Ramesh


I have to find the duplicates like above and wants to make a report for the client, then he decides which account he has to keep and which has to delete.

can you tell me how can we achieve this.

Awaiting for reply.....