Using wildcard characters in search

P

Pete Provencher

I'm trying to wirte a query that will display a certain text string. I want
to find all the records that one field is formatted in a certain way. I need
to see the records that start with 3 numeric values followed by 2 alpha
characters and then 3 numeric values ie 123AA456. In the criteria cell I
write Like "###??###" . This doesn't work as it displays records where all
the characters in ther field are numeric. Does anyone know how to do what I
need?

Pete Provencher
 
J

Jamie Collins

Pete said:
I figured it out. I used Like "###[a-z][a-z]###"

A slight improvement would be

LIKE '[0-9][0-9][0-9][A-Z][A-Z][0-9][0-9][0-9]'

This has the advantage of being able to work in both 'ANSI' (e.g. ADO)
and non-'ANSI' (e.g. DAO) modes.

Jamie.

--
 

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