NZ Function and Null VS 0 values

A

AmandaH

Here is my question, I have the following statment in a query:

PostSumCreated: Sum(NZ([Post_Sec2_7CreatedTotal])
+NZ([Post_Sec3_5CreatedTotal])+NZ([Post_Sec4_3CreatedTotal])
+NZ([Post_Sec4_5CreatedTotal])+NZ([Post_Sec5_4CreatedTotal])
+NZ([Post_Sec6_7CreatedTotal])+NZ([Post_Sec7_4CreatedTotal]))

This returns either the number of the addition or 0. The problem is
that I have NULL values in the table, where 0 would represent that yes
nothing was done and Null would represent that nothing was support to
happen. What I need help with is trying to add the needed columns if
they have a value >= 0 or leave a blank in the table if there was
nothing entered in any of the fields. Any one have any ideas?

~Amanda~
 
A

AmandaH

Thanks for trying to help, I figure out my problem. If at least one of
those fields has a 0 in it instead of a null value then it will return
the zero.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top