|
You may combine several Where clauses using logical operators. Each Where clause may comprise several linked Where clauses with optional parentheses. | ||||||||
![]() |
Combining Where Clauses | ||||||||
Syntax: |
|||||||||
{WHERE} & {WHERE} OR
|
|||||||||
|
|||||||||
Example: |
|||||||||
Definition of a selection condition as argument of a 'where' command (part of the combined select instruction): where("MAT.MAX_WIDTH">500 & "MAT.ISO"<>100) |
|||||||||
Result: | |||||||||
All records of the 'MAT' table are selected that contain a value greater than 500 in the 'MAX_WIDTH' field and whose 'ISO' field contents is not equal to 100. | |||||||||
Selection of data records |
|||||||||
Please note that the
use of Where clauses with logical operators will display different search
results depending on the LogiView command being used.
"Select" commandUsing the "select" command, records will be read directly from the database, thus displaying the records that exactly match the search criteria defined with the logical operators ("AND" or "OR") in the Where clause. "Select_ent" commandUsing the "select_ent" command will search for records via
a mask (e.g. item mask) and the search criteria in the LogiView command
is inserted into the mask fields. Since the contents of the mask fields
are coercively connected with the logic operator "AND", any
Where clause with the logical operator"OR" is ignored. Therefore,
the search result contains different records compared to using the "select"
command. |