Operator descriptions and examples

Operator Description
= value Matches if the character string in, or the value of, the data-record field equals the specified text or value. If you specify a character string, the characters must be delimited by quotes. For example, if you are matching on a field named City, the match condition = "Dallas" selects all records whose City field contains the entry Dallas.
value Equals (=) is the default operator. Thus, this case is equivalent to = value, except that the characters do not have to be delimited by quotes. For example, if you are matching on a field named City, the match condition Dallas selects all records whose City field contains the entry Dallas.
> value Matches if the data record field is greater than the specified value. For example, if you are matching on a field named Income, the match condition > 50000 selects all records whose Income field contains an entry greater than 50,000. Character strings must be delimited by quotes (> "Jones").
< value Matches if the data record field is less than the specified value. For example, if you are matching on a field named Income, the match condition < 50000 selects all records whose Income field contains an entry less than 50,000. Character strings must be delimited by quotes (< "Jones").
>= value Matches if the data-record field is equal to or greater than the specified value. For example, if you are matching on a field named Income, the match condition >= 50000 selects all records whose Income field contains an entry of 50,000 or greater. Character strings must be delimited by quotes (>= "Jones").
<= value Matches if the data-record field is less than or equal to the specified value. For example, if you are matching on a field named Income, the match condition <= 50000 selects all records whose Income field contains an entry of 50,000 or less. Character strings must be delimited by quotes (<= "Jones").
<> value Matches if the data-record field is not equal to the specified value. Character strings must be delimited by quotes. For example, if you are matching on a field named State, the match condition <>"TX" selects all records whose State field contains an entry other than TX.
between value1 and value2 Matches if the data-record field is between the range specified in value 1 and value 2. For example, if you are matching on a field named Income, the match condition between 50000 and 100000 selects all records whose Income field contains an entry 50,000 - 100,000. Character strings must be delimited by quotes.
and Constructs a comparison of two or more items. Matches only if the data record fields match all of the comparisons. The comparisons can only be applied to one field. For example, if you are matching a field named Income, the match condition > 5000 and <> 6000 selects all the records with income greater than 5000, but not a record of 6000.
or Constructs a comparison of two or more items. Matches if the data record fields match any of the comparisons. For example, if you are matching on a field named City, the match condition = "Dallas" or = "Fort Worth" selects all records whose City field contains either the entry Dallas or the entry Fort Worth.
NULL Matches when all characters are blank or when a character is binary zero (null). For example, you might want to discard any records that have all blanks for a name field.
* (asterisk) Wildcard match of any number of characters in a string. For example, to match on a field that contains the city name and state, the match condition Dall* would select records with any of the following entries:
  • Dallas-Forth Worth
  • Dallas, TX
  • Dallas TX
? Matches any single character in a string. For example, to match on a field that contains a last name, the match condition Sm?th would select records with any of the following entries:
  • Smith
  • Smyth