HELP with Null

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

Guest

I was trying to be creating in clearing a field, so I set a macro to set
value and set the expression to " " then I realized that I couldn't do that
beacuse of my query. In the criteria I have Is Null. Now I don't know how
to take the null out of my field so I can see my records.
Please help me.
 
Chey said:
I was trying to be creating in clearing a field, so I set a macro to set
value and set the expression to " " then I realized that I couldn't do that
beacuse of my query. In the criteria I have Is Null. Now I don't know how
to take the null out of my field so I can see my records.
Please help me.

Hi Chey

You need to decide if you want space (' '), zero-length string ('') or
Null to represent an empty field. If you are not sure about the
differences, write back or google on those terms.

Then, fix your data so the empty fields contain ' ', '', or Null.
I suggest you practice this on a copy of your database!

If you have a field like ' ' you want to set = Null

UPDATE MyTable SET MyField = Null WHERE MyField = ' '

If you have a Null Field you want to set = ' '

UPDATE MyTable SET MyField = ' ' WHERE MyField Is Null

HTH
 
Change the Criteria to:
Is Null Or "" Or " "
That will retrieve nulls, zero-length strings, and records containing a
single space.

If you plan to be working with databases, it is really important to learn
how to work with nulls. There's just a few places where people regularly get
hung up. For details see:
Nulls: Do I need them?
at:
http://allenbrowne.com/casu-11.html
 

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