Query for strings NOT containing a given character

M

Marv Miller

Is there a simple way to query for a string which does not contain a
given character? I have a database with a name field of the form
"lastname, firstname". As an error check, I would like to search for
entries which do not have a comma anywhere in the field.
 
V

Van T. Dinh

However, the correct Table Structure is to have TWO separate Fields, one for
LastName and one for FirstName. With 2 separate Fields, you can then
concatenate them whichever way you need.
 
J

John Spencer (MVP)

Criteria would be

NOT Like "*,*"

SELECT YourTable.TheFieldName
FROM YourTable
WHERE YourTable.TheFieldName NOT Like "*,*"
 

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

Top