Query Criteria for specific placeholders

  • Thread starter Thread starter TJAC
  • Start date Start date
T

TJAC

I have a table that contains actual data and examples. I only want the
actual data. The actual data would be something like PF-1234 and an example
would be something like PF-1234P
I want anything that has two characters before the dash and 4 characters
after the dash. Is there any way to do this without typing in all the
possibilities?
 
WHERE SOMEFIELD LIKE "??[-]????"

If you want exactly two letters, a dash, and four numbers

WHERE SomeField like "[a-z][a-z]-[0-9][0-9][0-9][0-9]"

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top