I have a web page which sometime allows duplicate entries of user submissions. Rather than restrict this at the database level, the client has asked for a report to list the User Id's(Identity field) of all duplicate records.
Now here is the problem. I am using this SQL to grab my records.
However because the field [USERID] is not in my grouping clause the statement fails.
I must list all the User ID's of duplicate records
Can anyone see a way around this?
Now here is the problem. I am using this SQL to grab my records.
Code:
SELECT UserId
FROM UserProfile
GROUP BY Login, Firstname, Lastname, Email, PrimarySiteId, PreferredName, ManagerID
HAVING (COUNT(*) > 1)
However because the field [USERID] is not in my grouping clause the statement fails.
I must list all the User ID's of duplicate records
Can anyone see a way around this?