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 |
|
caisys
Starting Member
16 Posts |
Posted - 2004-01-21 : 08:53:06
|
| hi,i have the following query to sum the total due balance for a customer:select sum(outstanding)from out where customer = 'myvariable' the problem is when the customer has no outstanding it returns NULL is there a way to return 0 when there are no outstanding?thanks |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
Posted - 2004-01-21 : 09:05:30
|
| Have a look at ISNULL in BOL |
 |
|
|
raymondpeacock
Constraint Violating Yak Guru
367 Posts |
Posted - 2004-01-21 : 09:11:33
|
| TrySELECT ISNULL(SUM(outstanding), 0)FROM outWHERE customer = 'myvariable'Raymond |
 |
|
|
|
|
|