Query for strings NOT containing a given character

  • Thread starter Thread starter Marv Miller
  • Start date Start date
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.
 
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.
 
Criteria would be

NOT Like "*,*"

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