Selecting columns containing spaces

  • Thread starter Thread starter Laurel
  • Start date Start date
L

Laurel

Both of these Select statements return the same set of rows. How can I find
out what's really in them?

Select * from tblAcademics where description = ""

Select * from tblAcademics where description = " "

In particular, can I trust that description is not null in those rows? The
following SQL returns no rows

Select * from tblAcademics where description is null
 
A column is either NULL or NOT NULL. It cannot be both. If it contains a
space or an empty string then it is NOT NULL.

-Dorian
 
I don't think I made myself clear. I wondered why the Select didn't
distinguish between an empty string and a string of one space. The first
two statements I list below retrieve the same rows.
 
I don't think I made myself clear. I wondered why the Select didn't
distinguish between an empty string and a string of one space.

Access truncates all trailing spaces in Text fields. If you put "" or " " or
for that matter " "
into a text field, it will store "" (if Allow Zero Length is set to true) or
NULL if it's not.

John W. Vinson [MVP]
 
Back
Top