WHERE field = '' <- Not returning data

  • Thread starter Thread starter pbaugh
  • Start date Start date
P

pbaugh

Hi folks,
Im a SQL Server developer who is currently using Access, so I'm
probably doing something really dumb. I have a simple query that is
searching on the criteria WHERE field = '' ie find me the records
where the text field is blank. I have two such records but the query
is returning an empty set. I though at first that maybe it was null so
I tried WHERE field = Null, but no luck there either.

Any ideas?

Many thanks
Pete
 
Try

Where Field is Null

Or (perhaps less efficient)

WHERE Field & "" = ""



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Try this:

WHERE Len(Field & "") = 0

The above will capture both a Null and an empty string value in the field.
 
Thanks guys! I was actually investigating doing a Len check so I was
on the right lines!

Thanks again
Pete
 

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