Link to home
Start Free TrialLog in
Avatar of ckelsoe
ckelsoeFlag for United States of America

asked on

MS Access Query - Help with <> in query

I have data that looks like this (simplified):

ID, Category
1,AB
2,CD
3,       <-- Blank or Null
4,EF
5,GH
6,AB
... 

Open in new window


When I try to filter out "GH" the query is also ignoring the Blank or Null rows. Here is the query:
SELECT ID, CATAGORY
FROM TestTable
WHERE CATAGORY <> "GH";

Open in new window


I have also tried this with the same results:
SELECT ID, CATAGORY
FROM TestTable
WHERE Not(CATAGORY = "GH");

Open in new window


I am at a loss why the results include all Categories except for "GH" (expected) and blank or null rows. This is omitting several thousand records that should be part of the results.
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ckelsoe

ASKER

Thanks - I forgot that. Query works as intended now.