I have a table that uses a column named UserID and there are ocassions where an user is terminated from employment and then comes back to the company again and the system generates the same UserId at that time. What I need is a query that will give me all users who have the same UserID. I have a unique ID in the same table. I tried the below but I get an error on the query.
SELECT ID, UserID, TermDate, LastName, FirstName FROM EMPLOYEES ORDER BY UserID HAVING COUNT(*)>1