Table B–1: Operators
Operator
|
Description
|
Example
|
=
|
Equality selects records where the value of the tested field is equal to the specified value.
|
State = "Massachusetts" Selects all the customers from Massachusetts.
|
<>
|
Inequality selects records where the value of the tested field is different to the specified value.
|
Balance<> 0 Selects all the customers with a credit balance not equal to $.00.
|
<
|
Less Than selects records where the value of the tested field is smaller than the specified value.
|
Cust-Num < 50 Selects all the customers 1 through 49.
|
>
|
Greater Than selects records where the value of the tested field is larger than the specified value.
|
Balance > 0 Selects all the records with a balance of more than $.00.
|
<=
|
Less Than or Equal To selects records where the value of the tested field is less than or equal to the specified value.
|
Amount <= 1000.00 Selects all the invoices that total less than or equal $1000.00.
|
>=
|
Greater Than or Equal To selects records where the value of the tested field is greater than or equal to the specified value.
|
Invoice-Date >= 05/27/94 Selects all the invoices dated 05/27/94 or later.
|
Begins
|
Selects records where the value of the tested field begins with a specific character.
|
Name Begins "J" Selects all the customers that start with the letter “J”.
|
Matches
|
Selects records where the value of the tested field matches one or more characters. Use “wildcard” characters to extend the range of pattern matching capabilities. Use an asterisk (*) to match any group of characters and a period (.) to match any single character in the specified position.
|
Name Matches "Urpon Frisbee" Selects all the customer records that match the name “Urpon Frisbee.” Name Matches *and* Selects all the customer records that contain the substring “and.” Postal-Code Matches 02.10 Selects records with the Postal-Code field matching 02010, 02110, 02210, 02310, 02410, 02510, 02610, 02710, 02810, and 02910.
|
Contains
|
Selects records where a particular field contains a specific word. Use an asterisk (*) at the end of a word fragment to extend the range of pattern matching capabilities for the word.
|
Comment Contains "credit" Selects those records where the Comment field contains the word “credit.” Comment Contains "cred*" Selects those records where the Comment field contains a word that begins with “cred”.
|
Range
|
Selects records where the value of the tested field falls within a specified range. Use the Inclusive checkbox to set whether or not the range is to be considered inclusive. If the range is inclusive, it contains the beginning and ending values.
|
Cust-Num Range 10 20 Inclusive Selects the records for customer numbers 10 through 20. Cust-Num Range 15 25 Exclusive Selects the records for customer numbers 16 through 24.
|