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 |
|
gemispence
Yak Posting Veteran
71 Posts |
Posted - 2006-03-08 : 10:08:30
|
| I'm trying to select records that occur more than once. I'm trying to base this on the email column. So basically I want the query to look something like this:select * from table where emailaddress count > 1Can someone provide me with the correct syntax? :) |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-03-08 : 10:11:33
|
| Something likeSelect column from yourTable group by column having count(*)>1MadhivananFailing to plan is Planning to fail |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-03-08 : 10:14:27
|
[code]select * from Email E join (select emailaddress from Email group by emailaddress having count(emailaddress ) > 1) t1 on t1.emailaddress = E.emailaddress [/code]Go with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|