I'm looking to pull a list of values that are used in a particular field in our sf.com data. Is there any function or command that will pull only one of each value?
Also, Is there any books out there on soql? The closest thing I have is the force.com cookbook.
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.