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 |
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2010-03-13 : 13:13:49
|
| I would like to add the PIC field to this stored procedure so I can find the duplicates. SELECT claim, pic, COUNT(claim) AS NumOccurrences FROM sheet1$GROUP BY claimHAVING ( COUNT(claim) > 1 ) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-13 : 14:24:07
|
| [code]SELECT s.claim, s.pic,c.NumOccurrences FROM sheet1$ sINNER JOIN(SELECT claim,COUNT(claim) AS NumOccurrences FROM sheet1$GROUP BY claimHAVING ( COUNT(claim) > 1 ))cON c.claim = s.claim[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2010-03-13 : 14:38:35
|
| Thank you!!!! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-14 : 00:21:31
|
welcome ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|