mgordon-spi
asked on
SQL Statement - Can't add ID
I have a statement that counts occurrences of a combined field. I need the ID number of each of those rows.
SELECT sFirstName + ' ' + sLastName AS Contacts, COUNT(sFirstName + ' ' + sLastName) AS NumOccurrences
FROM tContacts
GROUP BY sFirstName + ' ' + sLastName
HAVING (COUNT(sFirstName + ' ' + sLastName) > 1)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is your SQL Server version?
ASKER
That was great, thank you very much..