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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2007-02-12 : 21:50:21
|
Tina writes "There is a Stored Procedure, which extracts the data from lot of tables. Need to find the duplicates.. like two same SSN [Social Security Numbers] .If found , then add their dollar amounts]. Like their deduction amounts." |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-02-12 : 21:52:49
|
[code]select SSN, sum([deduction_amounts])from yourtablegroup by SSNhaving count(*) > 1[/code] KH |
 |
|
|
|
|