Use of wildcards and logical operators as search criteria
|
Use of wildcards and logical operators as search criteria
Use of Wildcard Characters is a very powerful way to specify search criteria. The asterisk (*), question mark (?), number sign (#), exclamation point (!), hyphen (-), and brackets ([ ]) are all wildcard characters. You can use these characters to find data that starts with specific characters or match certain patterns.
Typically you search for text which is matched with the start of a field by entering the text in the appropriate field in the Search Form provided. For example entering hop in the author field returns all records with authors starting with hop.
If in addition you enter the in the title field all records with author beginning with hop and title starting wtih the will be returned.
Empty fields
To search for records where the required field is empty, such as finding all Contacts that do not have an email address, enter Is Empty in the search field. This will return all records where this field is empty.
You can also search for a pattern anywhere in a field by preceding the pattern with an *. For example to search for the pattern their anywhere in the TITLE field enter *their
These searches are slower than the default searches which match text at the start of the field.
Return all records conforming to a range of values use >,< and BETWEEN
To find all records with values greater than or less than the value entered use the > (greater than) and < (less than) operators.
For example entering >gr in any text field will return all records where the entry in the corresponding field comes after gr in ascending alphabetical order. The reverse applies to the < (less than) operator.
Use the BETWEEN Operator to find values that lie between values you specify.
Entering BETWEEN 100 and 350 in a price field will return all record where the price is greater or equal to 100 and less than 350 (dollars or pounds depending on your currency designator)
To return all records having entries where the Last name is between Bre and Nap enter :Between Bre and Nap in the Last Name field. Note: this will include all entries from Bre up to Nap but not including Nap
Example of Usage of wildcards
To Find patterns anywhere in a field use *
*wh will find what, white, and why
*at will find cat, bat, and what
The asterisk (*) wildcard character matches any number of characters.
To Match single characters use ?
The ? wildcard character matches any single character e.g..
?b?ll finds ball, bell, and bill
To Match single digits use #
The # wildcard character matches any single digit.
#1#3 finds 103, 113, 123
To Match any specified characters []
[ae] Matches any single character within the brackets e.g.
b[ae]ll finds ball and bell but not bill
To Match any characters not specified [!]
[!ae] Matches any character not in the brackets e.g.
b[!ae]ll finds bill and bull but not bell
To Match any of a range of characters [-]
For a range of characters use -
-b[a-c]d finds bad, bbd, and bcd
Note The wildcard characters themselves (*,?,#,[) can be searched for in a field by surrounding them with [ ].
E.g. *[*] finds * anywhere in a field
These can be matched to themselves only if enclosed in brackets. For example, to search for a question mark, you would enter [?] in the field.