Filtering by expression

Top

At use of filtering by expression the data set is limited to the records satisfying to the filter which specify conditions of records selection.

Advantage of filtering by expression consist in the fact that it is applicable to any fields, including not indexed. As during selection all records of the table are looked through, the filtering by expression is effective at a small amount of records.

Filter expression represents a construction, which structure can include the following elements:

- bNames of tables fields;

- Literals;

- Operations of comparison;

- Logic operations.

If the field name contains Russian letters, it must be enclosed in square brackets.

The literal represents the value, set obviously (for example, number, string or a symbol).

Operations of comparison:

 = - it is equal

 <-it is less

 > - it is more

 <= - it is less and equally

 > = - it is more and equally

 <> - it is not equal.

As logic operations it is possible to use AND, OR, NOT.

As example of conditions assignment of a filtering we shall give following expressions:

[AREA] <= '400'

[Type] = 'Line' or 'Point'

The first expression provides selection of all records for which value of area field does not exceed 400, and the second - selection of records, which Type field contains Line or Point value.

For symbolical fields the search by partial coincidence is possible. With this purpose '*'  symbol is used, which replaces sequence of symbols of any length. We shall assume, it is necessary to make the list of cities, whose names begin on the letter "А":

[Point] = 'A* '

The output data for this query are submitted in the picture.

 

 

Symbolical values are recommended to be enclosed in single apostrophes (for example, 'Moscow').