How do I search for an asterick?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to search for a literal asterick using a Query. Access assumes
that I am using the asterick as a wildcard charactor and returns everything.
What is the correct delimiter so that I can find the asterick?
 
Assuming that the asterisk is embedded in a string

Criteria: LIKE "*[*]*"

If the asterisk is not in a string but is the entire string
Criteria: = "*"

When you need to search for wildcard characters using LIKE you can have them
taken as literals by enclosing them in [].
 
I am trying to search for a literal asterick using a Query. Access assumes
that I am using the asterick as a wildcard charactor and returns everything.
What is the correct delimiter so that I can find the asterick?

Bracket it in [Square brackets]: a criterion of

LIKE "*[*]*"

will find each record containing an asterisk anywhere within the text
field.

To find records where the field contains just a single asterisk,
nothing else, you can skip using the LIKE operator (which sees * as a
wildcard) and just use the = operator (which treats it as just another
character); a criterion of

"*"

will work in that instance.

John W. Vinson[MVP]
 

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

Back
Top