View Full Version : Need help using LIKE predicate


arage
10-19-2001, 10:29 PM
Need help using LIKE predicate
My database has story titles, but some titles are special b/c they don't start with letters, some of them include:

'Blue Eyes'
...And My Fear Is Great

I've been trying to specify criteria using the LIKE operator in my query to capture these types, but have come up empty handed. I basically want to show these "special titles" in a special set of results that only show them, but i cannot seem to capture titles that begin with non-alphaNumeric characters like a period or single quotation. What to do?

i'm using ACCESS 97

SteveA
10-19-2001, 10:40 PM
You can do a search using the LIKE operator by placing all the characters you are looking for inside square brackets. ie:

Like "['@$]*"

This will return any entries that contain an ', @, or $ n the first space. To search for it anywhere in a string, you can change the Like statement to read Like "*['@$]*". Have a look at the topic 'LIKE Operator' in Access Help. It covers all the different types of pattern matches you can perform.

HTH

SteveA

arage
10-20-2001, 12:16 PM
Well, this works....

Like "[!A-Z]*"

thanks though Steve

Surjer
10-22-2001, 12:03 PM
((InStr([table].[field],"criteria"))<>"0"))