Page 14 of 19PREVNEXT

Queries IV: Working with complex criteria

Query with ? wildcard in the criteria

This query retrieves part numbers that match all but the second character.

You might want to find data in which a letter or number occurs in a specific position in your data.

Perhaps you have product numbers, store identification numbers, tracking identification codes, or part numbers in which certain digits are meaningful.

Suppose that you want to retrieve all the part numbers for rivets. You know there are a few rivets in your parts database, but their names were entered by different people and some entries are abbreviated, so you can't query for the term "rivet" with a wildcard.

What you do know is that the part numbers are similar, except for the second character. For example, some of the numbers are RC083930, RF083930, and so on

You can use a question mark as a wildcard in the second position, which means that the variable character can only appear in the second position and that the rest of the number must match.

You'll get a chance to try this out in the practice at the end of this course.

Page 14 of 19PREVNEXT