Select query, exclude empty fields

  • Thread starter Thread starter GRCC
  • Start date Start date
G

GRCC

I am sorry, I have posted this question, but did not get a solution that I
could understand. I have no doubt it was the way I asked the question. I
will try again. I have a table (named member) I need to pull 3 fields.
Number (which is member #) , Name and internet (internet is the field name
for email address in the table( why I do not know) Not all have email
addresses filled in. I only want the number, name and email address of those
members that DO have an email address. I know it must be simple but I just
cannot get it I keep getting all names or none at all or error messages. Can
anyone help?
Thanks so much,
GRCC
 
Hi,


SELECT *
FROM myTable
WHERE NOT( email IS NULL)



or, if it can be NULL or an empty string:


SELECT *
FROM myTable
WHERE 0 <> len(email & "" )





Hoping it may help,
Vanderghast, Access MVP
 
Hi,
I got it to work by inserting <>"" in the criteria field in the internet
column of the query. Is the proper way to do this? Also, if <>"" means Has
Data, what would mean has no data?
Thanks
GRCC
 
Has Data (a string with no characters) would be

=""

Or in the query grid just
""

to be safe I would use

Field: Internet
Criteria: "" or Is Null
 
Back
Top