Re: Query With Not or <>



bshort1023@xxxxxxxxx wrote:
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

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


.



Relevant Pages

  • RE: Null or No Null values in a parameter query
    ... IIf([Press ENTER for nulls, 'N" not nulls] Is Null,1,0) test if ... All criteria on the same line must be met -- they are AND'd together. ... I can see that a field called 1 was added to my query with a ... "KARL DEWEY" wrote: ...
    (microsoft.public.access.gettingstarted)
  • Re: Figuring out what field is causing key violation on append
    ... Nz converts nulls to whatever you put as the second argument. ... Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia ... First try the query with just one field in the append query. ...
    (microsoft.public.access.queries)
  • Re: Multiple search Criteria
    ... IF the field you are searching against always has a value (no nulls allowed) and the field is a text field then you can use criteria like the following. ... The problem with the alternative above is that if you use the construct many times the query will quickly grow too complex and will not run. ...
    (microsoft.public.access.queries)
  • RE: Query by Form
    ... not handle Nulls. ... results of the query are displayed in a subform in the above mentioned form. ... By using the following criteria in each of the fields in my query (Like ...
    (microsoft.public.access.queries)
  • Re: Median
    ... so the nulls may be being re-introduced to the ... Run your XPercentile function and your query against that. ... I have not personally used this median function... ... Candia Computer Consulting - Candia NH ...
    (microsoft.public.access.reports)