Replace Nulls with Zeros

thawstone

Registered User.
Local time
Yesterday, 16:06
Joined
Aug 8, 2013
Messages
16
In the following simplified query, in some months(MonthOf) there were no warranties so I have a null field for AcceptedWarranties:

SELECT qryWarranty.MonthOf, qryWarranty.AcceptedWarranties
FROM qryWarranty;

In order to make my Warranty Trends graph work I need 0s. Other postings show the following statement should get the results I need:

SELECT ISNULL(AcceptedWarranties, 0 ) FROM qryWarranty

But no matter how I try to work this into the original code, the compiler finds reason to reject it.
Can someone please put me out of my misery.
 
Hello,

You can use Nz function as :

Code:
SELECT qryWarranty.MonthOf, nz(qryWarranty.AcceptedWarranties,0)as WarrantiesAccepted
FROM qryWarranty;
Good continuation.
 
Thank you kindly. I'd tried the Nz function without the ,0) to no avail. I don't know why I torture myself so needlessly when there are so many people like yourself willing to help.
 

Users who are viewing this thread

Back
Top Bottom