Including null fields

  • Thread starter Thread starter Tim
  • Start date Start date
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 ?
 
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 ?
 
Back
Top