You need to sign in to do that
Don't have an account?
Is It Possible To Identify Duplicate Records Via SOQL or API?
Hi All...
Please excuse me as I am new to the SF developer community.
I am looking for a method to programatically identify potential duplicate contact records within the SF database. We are going through a cleansing activity against our SF database and I'd like to be able to run an ad hoc query to identify duplicates. In general, I am looking for the ability to run GROUP BY queries against the database. I don't see this as a capability within the SOQL documentation. Is there a way to issue a statement something like the following...
select q1.FIRSTNAME, q1.LASTNAME
from CONTACTS q1
where 1 < (select count(*)
from CONTACTS q2
where q1.FIRSTNAME = q2.FIRSTNAME AND q1.LASTNAME = q2.LASTNAME)
Or something similar? I basically need to identify contacts with the same first and lastname to identify if they are really dupes.
Any suggestions would be greatly appreciated.
With Winter 2010 there are some new features functions available in SOQL including Group By. See below:
http://www.ext-it.com/2010/blog/soql-group-by-grouping-records-in-salesforce-com.html