Unique Records Selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top