May 31, 2006 #1 NFLDUser IS-IT--Management Apr 17, 2006 47 CA I have the following in my query... CCur(Avg(paid)) + CCur(Avg(provided)) AS avgvalue Sometimes paid or provided is null so it kills my avgvalue. Is there a way to wrap it to make it a 0 when its null?
I have the following in my query... CCur(Avg(paid)) + CCur(Avg(provided)) AS avgvalue Sometimes paid or provided is null so it kills my avgvalue. Is there a way to wrap it to make it a 0 when its null?
May 31, 2006 1 #2 PHV MIS Nov 8, 2002 53,708 FR Have a look at the Nz function. Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Have a look at the Nz function. Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
May 31, 2006 1 #3 Golom Programmer Sep 1, 2003 5,595 CA Code: CCur([COLOR=red]NZ([/color]Avg(paid)[COLOR=red])[/color]) + CCur([COLOR=red]NZ([/color]Avg(provided)[COLOR=red])[/color]) AS avgvalue Upvote 0 Downvote
Code: CCur([COLOR=red]NZ([/color]Avg(paid)[COLOR=red])[/color]) + CCur([COLOR=red]NZ([/color]Avg(provided)[COLOR=red])[/color]) AS avgvalue
Jun 1, 2006 Thread starter #4 NFLDUser IS-IT--Management Apr 17, 2006 47 CA Thanks guys!! Upvote 0 Downvote