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 |
|
olocin
Starting Member
9 Posts |
Posted - 2005-04-17 : 21:57:41
|
| hi help on displaying duplicate values heres what i have started.select count(col1) as valuescol1, col1group by col1having count(*)>1 the outputvaluescol1 col1 2 John Doe3 Mr. Smith 2 Mrs.Kidmannow wat i wnt to do is to display the values and not the countlike thiscol1John DoeJohn DoeMr. SmithMr. SmithMrs.KidmanMrs.Kidman |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-04-17 : 22:03:28
|
Here's one way:select col1 from myTable aJOIN ( select col1 from myTable group by col1 having count(*)>1 ) b ON a.col1 = b.col1 Be One with the OptimizerTG |
 |
|
|
olocin
Starting Member
9 Posts |
Posted - 2005-04-18 : 01:05:07
|
| Your are rily good. thank you so much.. It worked |
 |
|
|
|
|
|