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
 General SQL Server Forums
 New to SQL Server Programming
 Group By

Author  Topic 

maya_zakry
Constraint Violating Yak Guru

379 Posts

Posted - 2007-01-16 : 22:59:37
hello,

how to SELECT col1 that has only multiple entry?
col1
ww
ww
xx
zz

will return www

thanks

~~~Focus on problem, not solution~~~

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-01-16 : 23:06:30
I suspect this is a homework assignment, but I'll throw you a bone...

SELECT col1
FROM Table1
GROUP BY col1
HAVING COUNT(*) > 1

Tara Kizer
Go to Top of Page

maya_zakry
Constraint Violating Yak Guru

379 Posts

Posted - 2007-01-18 : 20:53:04
no it's not homework :P, it's to check my db

~~~Focus on problem, not solution~~~
Go to Top of Page
   

- Advertisement -