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.
| Author |
Topic |
|
bronsonr33
Starting Member
1 Post |
Posted - 2007-05-03 : 11:21:57
|
| Hi, I'm attempting to write a small query that will search all entries in a colum and compair their values to see if there are any duplicates, then display only the duplicate entries. I'm running into trouble when using ms sql 2000 in that it does not like the COUNT statement. Any ideas? |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-03 : 11:23:21
|
| Probably it is the way you wrote COUNT() is not acceptable to the SQL Server. Post the query here so that we can help you further.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-03 : 11:26:57
|
| select yourDuplicatedColumnfrom your tablegroup by yourDuplicatedColumnhaving count(yourDuplicatedColumn) > 1_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-05-04 : 00:31:00
|
| You need to learn SQLSearch for "Learn SQL" in this forumMadhivananFailing to plan is Planning to fail |
 |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-05-04 : 00:39:21
|
| Spirit1's query is the way to find the duplicate entries in the table |
 |
|
|
|
|
|