| SQL advanced -> | Using wildcards in MS-Access LIKE function |
|
The use of wildcards inside LIKE function
can save a lot of effort when you write query that looks for some pattern in
character string. The wildcards are: * substitute for unlimited amount of characters at the BEGINING/END of the string. ? substitute for one character inside square brakets ! substitute for number of character inside square brakets Look for Customer names that begins with "A" and fifth char is "n":
The result will be like this:
Look for Customer names that have characters "x", "y", "z":
The result will be like this:
Look for Customer names that starts with "M" and have characters "e" or "a" somewhere inside:
The result will be like this:
But as for my expirience expressions LIKE '*[!abc]*' not allways work properly in MS-Access queries. Sometimes they return very unexpected results. |