|
In order to change priority of conditions, you may use parentheses in Where clauses. These work analogous to parentheses in mathematical expressions. Parentheses for Where clauses may for example be required when using the logical operator '|' (OR). |
||
Syntax: |
|||
({WHERE})
|
|||
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 | "MAT.ISO"=117)) |
|||
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 either 100 or 117. Without parentheses, only such records would be selected, whose "MAX_WIDTH" field contents either is greater than 500 and whose "ISO" field contents is 100 or the contents of the "ISO" field is 117. In the latter case, the contents of the "MAX_WIDTH" field does not matter. |