= Null vs Is Null

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

Guest

Hi all,

I have an SQL Select statement and where clause is "Where MyDate = Null". I
can use it on my pc But not in another pc. I have to change it to "Where
MyDate Is Null" to be executabled in another pc. What is the option to be set
for this different ? And which one should I use ?

note : I use AccessXP and all tabel is linked table.

Thanks in advanced,
 
= Null is incorrect as Null means "undefined". It could be empty, it might
not be, but testing if the field is "undefined" (Is Null) is ok.
 
Thanks for your reply. OK, I will use Is Null. But I would like to know that
What do you mean field can be "empty" ? And "empty" <> Null ?
 
Suntisuka

Pardon my intrusion. A field might hold a string of characters "12345 Elm
St". It might hold a "zero-length string", designated as two quotes without
any spaces (""), in which case, it is considered "empty". But if what the
field contains is undefined, or Null, you don't know what it is (i.e.,
undefined).

An analogy in numbers is a field for entering the number of cars passing
your corner in a given 5 minute period. That field might hold "10", or
might hold the number "0", but if it has nothing, you can't tell whether
that was supposed to be "0", or if nothing was ever put in the field, i.e.,
undefined.

You are correct -- "undefined <> Null". In fact, "Null <> Null"! You can't
compare to a "Null value", since it is undefined.
 
Thanks a lot. Now I'm clear :-)

Jeff Boyce said:
Suntisuka

Pardon my intrusion. A field might hold a string of characters "12345 Elm
St". It might hold a "zero-length string", designated as two quotes without
any spaces (""), in which case, it is considered "empty". But if what the
field contains is undefined, or Null, you don't know what it is (i.e.,
undefined).

An analogy in numbers is a field for entering the number of cars passing
your corner in a given 5 minute period. That field might hold "10", or
might hold the number "0", but if it has nothing, you can't tell whether
that was supposed to be "0", or if nothing was ever put in the field, i.e.,
undefined.

You are correct -- "undefined <> Null". In fact, "Null <> Null"! You can't
compare to a "Null value", since it is undefined.

--
Good luck

Jeff Boyce
<Access MVP>
 
Back
Top