NZ display 0 if query result is nill

M

Mat

Hello

I have this simple query that either displays a value or can be null,

SELECT [Quaterly total number of workshops aberdeen].CountOfTown
FROM [Quaterly total number of workshops aberdeen];


Having read about the NZ function I would like to display a 0 if is
null. So I tried this

SELECT Nz([Quaterly total number of workshops
aberdeen].[CountOfTown],0) AS Expr1
FROM [Quaterly total number of workshops aberdeen];

but it doesn't return a 0,

could someone tell me what Im doing wrong, or even how to do it right

Thanks for nay help in advance

Mat
 
J

John Spencer

If the query returns zero records (rows) then NZ is not applicable since
nothing is returned.

If the query returns a record (a row) where the field value is null, then NZ
will return the zero.
 
M

Mohammed issa

Hi,

the query you have wrote is correct, but could you let me know what happen
once you run your query?

bye,
 
Top