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

what does the command NZ() do in an sql query?

Status
Not open for further replies.

Delboy14

Programmer
Jun 21, 2001
213
GB
what does the command NZ() do in an sql query? The reason I ask is thlbroadbent advised me to use it in a query, which was great as it worked. The problem I am having is when I access the database query from Crystal Reports it complains that it does not recognise the command NZ(), before I try to get around this I was wondering if anyone could explain what it does, thanks
 
Hi!

Nz looks full nulls in the field and replaces them with the value you give it.

hth
Jeff Bridgham
 
Nz (stands for "Null to zero") is basically the same thing as Iif(IsNull([fieldname]),0,[fieldname]), and you can tell it to use something else in place of the zero.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top