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
 

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

Similar Threads

Select Query Criteria 4
sql query reqest 1
query criteria 2
Word Dashed line formatting 0
Left-Right Functions? 1
Query Expression Help Needed 1
filtering in queries 1
Query criteria to see middle 4 characters/12 char field 1

Back
Top