Including null fields

T

Tim

Field A has values that I need to total.

Field B has text values, including Null values, that I
need to exclude one particular text value from.

However when I input the the text value to exclude and run
the query the resulting total of Field A also excludes any
row that had a Null value in Field B.

Is there any formula that I can put in that will exclude
the text value I want to exclude, but include any Null
value records from Field A ?
 
D

Dale Fye

Tim,

Try:

Select SUM(FieldA) as SumOfA
FROM yourTable
WHERE FieldB IS NULL OR FieldB <> 'yourValue'


--
HTH

Dale Fye


Field A has values that I need to total.

Field B has text values, including Null values, that I
need to exclude one particular text value from.

However when I input the the text value to exclude and run
the query the resulting total of Field A also excludes any
row that had a Null value in Field B.

Is there any formula that I can put in that will exclude
the text value I want to exclude, but include any Null
value records from Field A ?
 

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