Tricky Wildcard

C

cru

I am looking to find ways to use wildcard to find a first character (E)
and a fifth character (U)...the tricky part is five number sequence after
the U must be numerical. Is this possible?

i.e. I have batch ID: E208U75432, need to search by first character (E) then
fifth character (U) preceeded by five numerical character.

I have like E%%%%U but not sure how to set a criteria to say next fifth
character must be numerical.

Any assistance is appreciated. Thanks.
 
M

Michel Walsh

Have you tried [0-9] repeated five times in all:


E%%%%U[0-9][0-9][0-9][0-9][0-9]



Vanderghast, Access MVP
 
J

John W. Vinson

i.e. I have batch ID: E208U75432, need to search by first character (E) then
fifth character (U) preceeded by five numerical character.

LIKE "E???U#####" will work in Access; ? matches any single character, and #
matches any numeric digit. The % wildcard is for SQL/Server syntax and refers
to any number of characters and is not a wildcard in Access/JET.
 

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