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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null needs to be '0' (zero)

Status
Not open for further replies.

jasonstewart

Programmer
Mar 14, 2002
39
US
I have a query that does a bunch of calculations and makes a new table with some columns having numbers and some have null I need the null fields to be zero. How can I do this ?

 
That may be the case, however I have never used it and it may be simple to you but having never been exposed to the Nz function I haven't any clue how to use it. I guess I will try to utilize this information. Thank you.
 
Lets say you have a variable named MyNum that your going to assign to another variable or insert it into a table and it cannot be Null.

OtherVariableName = nz(MyNum,0)

If MyNum = Null then assign 0 to OtherVariableName. Otherwise, assign the value of MyNum.

Check the help files for nz and it will give you other examples.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top