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
 Transact-SQL (2000)
 Finding Duplicate Values

Author  Topic 

Pace
Constraint Violating Yak Guru

264 Posts

Posted - 2005-02-17 : 05:23:54
Hey all,

I have an ID column and there are duplicate values in there that need to be changed.

How do I query to return only the values that have duplicates ?

My current query;
SELECT [job no] FROM job
ORDER BY [job no]

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-02-17 : 05:30:15
SELECT [job no]
FROM job
group by [job no]
having count(*)>1


Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -