Create a Query Expression
The first step in creating a query, is to create an Expression. As you can see at the top right of the Filter Data dialog, an Expression consists of Data, Operator and Operand.
For example, the following are valid Expressions:
TYPE == joint
SPACING < 1.5
Set != 2
Data
The Data drop-down list will always contain:
- The names of the columns of the current file, in order of appearance in the spreadsheet, followed by
- The Processed Orientation data (i.e., Processed Trend, Processed Plunge, etc.)
NOTE: The user CANNOT type in the Data box, an item must be selected from the list. This prevents errors due to incorrect typing.
Operator
The Operator drop-down list will always contain the following operators:
- == (equals)
- != (not equals)
- < (less than)
- <= (less than or equals)
- > (greater than)
- >= (greater than or equals)
- Includes (find data containing a given substring)
Note that the behaviour of the < , <= , > and >= Operators depends on the nature of the Operand. If the Operand is numeric, then the comparison will be numeric. If the Operand is a text string, then a string comparison will be performed.
NOTE: The user CANNOT type in the Operator box, an operator must be selected from the list. This prevents errors due to incorrect typing.
Operand
The Operand drop-down list will contain a sorted list of the data in the Data column you have selected (i.e., the Data box at the left of the Expression). Note that the sorting of the Operand list is based on a string comparison, therefore numeric Data will not necessarily be listed in numeric order (i.e., the numbers 2, 3, 200 would be listed in the order 2, 200, 3).
The Operand drop-down serves two purposes:
- It shows the user the contents of a selected Data column.
- It allows the user to select from the list with the mouse.
However, unlike the Data and Operator boxes, the user CAN TYPE in the Operand box. This allows the user to type in specific numeric values, or to type in substrings to be searched for by the Includes Operator, for example.