Unique Records Selection

T

Tatakau

How would I list all records where a value in a column appears more than once?

EG:

Table 1:
id letter
1 a
2 a
3 b
4 c
5 d
6 d

Query 1:
id letter
1 a
2 a
5 d
6 d

Thanks!

Nick
 
J

John Spencer

Use the Duplicates query wizard to find duplicates.

SQL would look like

SELECT ID, Letter
FROM Table1
WHERE ID in
(SELECT tmp.ID
FROM table1 as Tmp
Group by tmp.Id
Having Count(Tmp.ID) > 1)
 
Top