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 - 2005-01-28 : 08:21:43
|
| MarioK writes "Hi all,I try to Sum the total interest columnmoney Tablecolumn interest 123.5 145.3 Null .12please show me. Thanks" |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-01-28 : 09:30:55
|
select sum(isnull(interest, 0)) as Interest_sum from TableGo with the flow & have fun! Else fight the flow |
 |
|
|
MarioK
Starting Member
20 Posts |
Posted - 2005-01-28 : 12:15:04
|
| Thankx very mucho spirit1 |
 |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2005-01-28 : 15:22:12
|
| you don't really need to convert the Null values. The aggregates will ignore Null columns.select sum(interest)from MyTableBoth will yield the same answer but one is slightly more efficient.(Yes, I'm retentive)HTH=================================================================Our elections are free, it's in the results where eventually we pay. -Bill Stern, sports announcer (1907-1971) |
 |
|
|
|
|
|