Click here to Skip to main content
15,906,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Sir,

I need one help from your side in sql server2008.I have a table the columns names are custid,Special_Amount.

Ex:
custid Special_Amount
6E207 4624.00
6E207 4624.00


I need Following answer

custid Special_Amount
6E207 9248.00
Posted

SQL
select custid,sum(Special_Amount) as Special_Amount from tbl group by custid

Happy Coding!
:)
 
Share this answer
 
Comments
AshishChaudha 7-Aug-12 2:13am    
my 5!
Aarti Meswania 7-Aug-12 2:16am    
thank you :)
AshishChaudha 7-Aug-12 2:18am    
yours Welcome
C#
select custid,sum(Special_Amount) as Special_Amount from tbl_temp group by custid
 
Share this answer
 
Comments
AshishChaudha 7-Aug-12 2:14am    
my 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900