Connecting Tech Pros Worldwide Help | Site Map

Query With Not or <>

bshort1023@yahoo.com
Guest
 
Posts: n/a
#1: Jul 17 '06
I have text field with 3 possible values: C, F, or Null.

When I query with criteria: Not "C", I get only the F records and not
the Nulls. Is this normal?

I have been working with a SQL table through ODBC and when I use Not
"C" on that table I get the F records and the Null records. When I do
it against an Access table with the same field properties I get the
above results.

Rick Brandt
Guest
 
Posts: n/a
#2: Jul 17 '06

re: Query With Not or <>


bshort1023@yahoo.com wrote:
Quote:
I have text field with 3 possible values: C, F, or Null.
>
When I query with criteria: Not "C", I get only the F records and not
the Nulls. Is this normal?
Yes. Null is never equal to nor NOT equal to anything else (even another
Null). You need to use...

<"C" Or Is Null
Quote:
I have been working with a SQL table through ODBC and when I use Not
"C" on that table I get the F records and the Null records. When I do
it against an Access table with the same field properties I get the
above results.
SQL Server an be configures to handle Nulls in more than one way. The way
Access is handling them is considered the "correct" way.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Closed Thread