Empy String vs. Null

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I should know and understand this, but I don't. Could somebody please
review the difference between these to values?

I have a column that either contains a code or it does not, but I have to
test for both null and "". I just can't understand the difference.

Please 'splain it to me.

TIA

Paul Hammond
--
 
When I filter the data, I keep in mind few things

In a Number and date field, I check for Null
In a Text field I check for Null and Empty

the text field before any value been enterd into will return a Null, but if
a value was entered into a text field, and then been deleted by the user in
the form, will return empty.

If I'm wrong by that I'll be happy if somebody will correct me.
 
Think of Null as meaning "Unknown"

Take a look at the Employee table in the Northwind database that came with
Access. There are fields for information about the employee, including who
they report to. If you were to add an employee to the table, and you didn't
know to whom they reported, you'd leave the ReportsTo field as Null, because
it's unknown (at least to you). Once you found out, you'd fill the field in.
If, however, a particular person didn't report to anyone, you'd put blank
in, because now you know to whom they report, and it's no one. (I know, not
the greatest example, but it was the easiest to think of in terms of
databases to which you should have access!)
 

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

Back
Top