Relations of matching the pattern permit the user to compare string fields and also the fields of date and time with the operand pattern. Simple condition using comparison relations should have one operand – a pattern. In table 26-5 relations of matching the pattern admissible for ObjectLand are given.
symbol | name | Requirement for true simple condition |
* | Matching | The field value matches the pattern specified by the operand |
~* | Not Matching | The field value does not match the pattern specified by the operand |
Table 26-5. Relations of matching the pattern
In the pattern for string fields special wildcard characters “*” and “?” can be used. These characters denote, respectively, “any (perhaps zero) number of any characters” and “one arbitrary character”.
Examples:
let's suppose that it is necessary to find all certificates of buildings in all streets which name starts from letter “B”. In this case it is required to use the relation “matching” and specify the string “B*” as a pattern. Certificates of buildings located in the streets with names: “Broadway”, “Bond St.”, “Baker St.” or simply “B”, if there is such a street, will be displayed;
let's suppose that it is necessary to find people whose surname starts from “B…” and ends in “…on” (only the beginning and the end of surname were understood in a hand-written document or in telephone conversation). In this case it is necessary to specify the string “B*on” as a pattern. People with surnames “Borson”, “Bacon”, “Bourbon”, “Bon”, “Berlington” and so on will be displayed;
it is necessary to find a person with the surname “Harvey” or “Barney” (the first and fourth letters of the surname were not clear in a hand-written document). In this case the string “?ar?ey” should be specified as a pattern. Since the character “?” denotes “one arbitrary character” the result of request will be a list containing not only surnames Harvey and Barney, but also Harley, Bartey, Barley, Marvey, etc.
In the pattern for field types “Date”, “Time” and “Timestamp” only the wildcard character “*” can be used. The pattern format should correspond to the format of date and time set in Windows (for example, M/dd/yyyy hh:mm:ss AM/PM), the character “*” can replace date, month, year and also hours, minutes and seconds:
the pattern “3/*/1998” denotes “any day of March 1998”;
the pattern “*/1/1998” denotes “the first of any month of 1998”;
the pattern “03/20/*” denotes “March 20 of any year”;
the pattern “*/*/2002” denotes “any day of 2002”;
the pattern “5/*/*” denotes “May of any year”;
the pattern “*/1/*” denotes “the first of any month of any year”;
the pattern “2:*:* PM” denotes “any time from 2:00:00 PM to 2:59:59 PM”;
the pattern “12/31/* *:59:* PM” denotes “the last minute of any hour in the afternoon of December 31 of any year”.