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 |
|
manu
Starting Member
41 Posts |
Posted - 2005-10-18 : 02:48:49
|
| HelloI want to get sum of 4 fields in a sql query result.suppose i have a table with 4 fields (a,b,c,d) and 4 records for each of them.i want that my query result should display1. sum of individual field records( i have done this with sum(a))2. sum of sum of final 4 fields (sum(a) + sum(b) + sum(c)+ sum(d))is it possible. Pls help me in doing second step.Munish Gupta |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-18 : 02:56:17
|
| This will work if the fields are not nullSelect sum(a+b+c+d) from yourTableMadhivananFailing to plan is Planning to fail |
 |
|
|
manu
Starting Member
41 Posts |
Posted - 2005-10-18 : 03:52:14
|
| Thanks a lot siryou have again solved my problem.it is wonderful.Thanks againMunish Gupta |
 |
|
|
|
|
|