Sometimes clients ask to make registration at the site with uniq emails only. It somehow prevents to appear duplicates of the users. But sometimes site is live already and have a lot of registered users, then it needs to find all users with not uniq emails in DB and to fix. It is possible with query like this:
SELECT UserID, UserName, FirstName, LastName, Email, DisplayNameFROM {databaseOwner}{objectQualifier}UsersWHERE Email IN(SELECT EmailFROM {databaseOwner}{objectQualifier}UsersGROUP BY EmailHAVING COUNT(Email)>1);Hope this helps!
No comments:
Post a Comment
Note: only a member of this blog may post a comment.