Sum with a null value

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

My query contains 100 items plus the sales number of five different
customers. Not everyone customer has sales for each item. I am trying to
total the sales of all five customers but only get a sum if each customer
has a sales value. Can I still get a sum if a customer has a null value?

Any help is appreciated. Thanks
 
John Smith said:
My query contains 100 items plus the sales number of five different
customers. Not everyone customer has sales for each item. I am trying to
total the sales of all five customers but only get a sum if each customer
has a sales value. Can I still get a sum if a customer has a null value?

Any help is appreciated. Thanks

You could use the Nz (null to value) function to convert nulls to zeros.

Keith.
www.keithwilby.co.uk
 
"How" depends on "what", as in "what data/table structure are you using".

Please describe your table structure and post the SQL statement of your
query.

(... and as described else-thread, look into the Nz() function...)

Regards

Jeff Boyce
Microsoft Access MVP
 
Back
Top