Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query returns null problem 2

Status
Not open for further replies.

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?
 
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
 
Code:
CCur([COLOR=red]NZ([/color]Avg(paid)[COLOR=red])[/color]) + 
CCur([COLOR=red]NZ([/color]Avg(provided)[COLOR=red])[/color]) AS avgvalue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top