geospatial
Active Member
- Joined
- Sep 2, 2008
- Messages
- 290
I currently have the following SQL code
It does work unless there is more than one set of duplicates and then I get the error: "At most one record can be returned by this subquery". I am not sure how to fix this issue in the SQL Code.
SQL:
SELECT qryAllKeys.KeyTitle, qryAllKeys.employeeFirstName, qryAllKeys.employeeLastName, qryAllKeys.employeeMiddleInitial, qryAllKeys.keyNumber, qryAllKeys.serialNumber
FROM qryAllKeys
WHERE (((qryAllKeys.KeyTitle)=(SELECT [KeyTitle] FROM [qryAllKeys] As Tmp GROUP BY [KeyTitle] HAVING Count(*)>1 )))
ORDER BY qryAllKeys.KeyTitle;
It does work unless there is more than one set of duplicates and then I get the error: "At most one record can be returned by this subquery". I am not sure how to fix this issue in the SQL Code.