Find Records that are NOT duplicates

C

cleech

Hello All:
I have a list of numbers most of which are duplicates. However, some
numbers are listed only once. I would like to create a list of the
numbers that are only listed once. Eliminating duplicates is not a
problem, but how can I isolate the numbers listed only once.

Hopefully it is something easy that I am just not thinking of...

Here is a quick example:

1111
1111
2222
3333
3333
4444
4444
5555
6666
6666

I would only want 2222 and 5555.

Any help is greatly appreciated.
 
M

Matthias Klaey

cleech said:
Hello All:
I have a list of numbers most of which are duplicates. However, some
numbers are listed only once. I would like to create a list of the
numbers that are only listed once. Eliminating duplicates is not a
problem, but how can I isolate the numbers listed only once.

Hopefully it is something easy that I am just not thinking of...

Here is a quick example:

1111
1111
2222
3333
3333
4444
4444
5555
6666
6666

I would only want 2222 and 5555.

Any help is greatly appreciated.

SELECT MyTable.MyNumber
FROM MyTable
GROUP BY MyTable.MyNumber
HAVING Count(MyTable.MyNumber) =1;

HTH
Matthias Kläy
 
G

Guest

SELECT Numb, COUNT(*) As Cnt FROM tblTest GROUP By Numb

will give you a table with 2 columns, the number and the number of
occurrences of it, you then just pick the rows with Cnt=1

-Dorian
 

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

Top