Filter Examples
A filter is used to limit a dataset to those records that satisfy certain selection criteria.
The Filter Editor is designed to help you set up these search criteria. You build the selection clause by double-clicking on field names and operators in the various listboxes, and by typing constant values where needed.
Here are some examples of filter clauses:
END_DEPTH >= 50
(all records where END_DEPTH has a value of greater than or equal to 50)
PROJECT <> 'BLOCK5'
(all records where the field PROJECT has a value not equal to BLOCK5)
Selection criteria may be combined to form compound logical expressions. This is done by using AND and OR, for example:
XCOORD > 40000 AND XCOORD < 50000
(where both conditions apply)
PROJECT = 'BLOCK1' OR PROJECT = 'BLOCK2'
(where either condition applies)
One thing to keep in mind is the fact that the AND operator has precedence over OR; i.e., the AND condition will always be evaluated first. For example, the statement:
<expr.1> OR <expr.2> AND <expr.3>
will in effect be evaluated as
<expr.1> OR ( <expr.2> AND <expr.3> )
When in doubt, use parentheses to group expressions. It will remove ambiguity and enhance the clarity of the statement.
While a filter is not as powerful as a SQL query, it has the advantage of returning a "live" dataset. In other words, one that can be edited directly. Datasets returned by queries are read-only
When an ADO table dataset is configured with a filter (a filter was included in the SQL statement used to build the dataset), the filter is retained when a query is generated to create a data view. While it is desirable to set a "fixed" filter in this way, Micromine Geobank does not see the dataset as being filtered. In other words, the fixed filter is effectively hidden from the user. The dataset will only appear to be filtered when the user applies an additional "temporary" filter via the data view. The Remove Filter function will cancel the user's filter, but not the "fixed" filter.