• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Adding null values in access

I am trying to add two number, by problem is that when one is blank then it will not add.  How can I change this to add even if one of the numbers is null.  Thanks

SELECT qselGuestCountbyHour.CountOflngmemberid+qselMembersperhour.CountOflngmemberid AS [count], qselMembersperhour.hour, qselMembersperhour.lngtype, qselMembersperhour.Expr1, qselGuestCountbyHour.CountOflngmemberid, qselMembersperhour.CountOflngmemberid
FROM qselGuestCountbyHour RIGHT JOIN qselMembersperhour ON qselGuestCountbyHour.hour = qselMembersperhour.hour
WHERE (((qselMembersperhour.lngtype)=1))
ORDER BY qselMembersperhour.hour, qselMembersperhour.Expr1;
0
running32
Asked:
running32
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>I am trying to add two number, by problem is that when one is blank then it will not add.
SELECT Nz(YourFirstNumber, 0) + Nz(YourSecondNumber, 0) as MakeUpANameHere
0
 
running32Author Commented:
THANK YOU
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now