Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Finding nonduplicates?

Author  Topic 

Johnhamman
Starting Member

37 Posts

Posted - 2002-08-03 : 23:46:51
Hi once again. I have a table that the field 'cID' can contain duplicates. But i want to pull back from a select all the records that are not duplicated. does anyone know how to do this?
thanks
john

Johnhamman
Starting Member

37 Posts

Posted - 2002-08-03 : 23:58:02
I figured it out. For the record

SELECT groups.cID, Count(groups.cID) AS CountOfcID
FROM groups
GROUP BY groups.cID
HAVING (((Count(groups.cID))=1));


Go to Top of Page
   

- Advertisement -