PDA

View Full Version : exclude null results?



debauch
10-05-2007, 06:16 AM
Hello,

I have a query that is taking (A + B) / A. However, if A is null, the query is bringing back nothing. How do you exclude NULL results?

Tom
10-05-2007, 06:52 AM
This might work..but if you want blanks in the sum column be sure to make the default value for C blank not 0.

UPDATE [TABLE] SET [TABLE].C = ([TABLE]![A]+[TABLE]![B])/[TABLE]![A]
WHERE (((TABLE.A) Is Not Null));

asingh
10-06-2007, 07:01 AM
or simply in the GUI of the query...under WHERE for "A" just write...

is not null...

it will not process any rows where A = NULL.

regards,

asingh