WHERE mystery

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
 
K

KARL DEWEY

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 <>""
 
J

John Harrington

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top