UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How can I treat null value as zero?    
 
   
steven381
post Jun 20 2008, 08:49 AM
Post #1

UtterAccess Veteran
Posts: 364
From: NYC



When [PaymentAmount] or [discountAmount] are null access returns a null result. I would like to treat the null value as zero for this calculation.

SELECT Payments.TenantName, Payments.PaymentAmount, Payments.discountAmount, [PaymentAmount]-[discountAmount] AS Expr1
FROM Payments;


Thanks Steven
Go to the top of the page
 
+
dashiellx2000
post Jun 20 2008, 08:51 AM
Post #2

UtterAccess VIP
Posts: 9,209
From: Maryland



Try:

CODE
SELECT Payments.TenantName, Payments.PaymentAmount, Payments.discountAmount,
Nz([Payments]![PaymentAmount],0)-Nz([Payments![discountAmount],0) AS Expr1
FROM Payments;


HTH.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 26th May 2013 - 12:54 AM

Tag cloud: