WHERE mystery

  • Thread starter Thread starter John Harrington
  • Start date Start date
J

John Harrington

I had an "Is Not Null" criterion on a particular field in a query.

This filtered out *almost* all records where this field was Null. For
some reason, three records where this field appeared to be Null were
still being included in the query!

On the theory that some non-printing character was there, I put my
cursor in the cells and hit delete. They still appeared in the
query. I then copied the field from a record that was excluded from
the query and pasted it into the misbehaving fields. Those records
were then excluded from the query.

Why did this occur? What was in those fields that was being
registered as Not Null? And what other criterion would have excluded
both them and the "true" Nulls?


Thanks,
John
 
Besides having Null fields you can have 'zero lenght' fields. These are
records that did have data and then the data was deleted.
Use this criteria --
Is Not Null OR <>""
 
Besides having Null fields you can have 'zero lenght' fields.  These are
records that did have data and then the data was deleted.
Use this criteria --
    Is Not Null OR <>""

Thank you, Karl.


John
 
Back
Top