Logical Operators

In additional to creating simple searches using a single search query, you can create complex combination queries using the logical operators (AND/OR).

Example One - OR Operator

You want to search for all the parts that were modified. This can be done by checking for a value in the Change Reason attribute of a part or some value in the Change Detail attribute of a part. The combination query will be created as follows:
Table 1. Combination Query
AND/OR Parenthesis Attribute Operator Values
    Change Reason IS NOT NULL  
OR   Change Detail IS NOT NULL  
This combination query displays the parts that were modified.

Example Two - AND Operator

You want to search for all the parts that satisfy the following conditions at the same time:
  1. Code is not NULL
  2. Revision is 'metro'
  3. Description begins with 'A-'
  4. Unit weight is between 1 and 10 kg
This can be done using the following set of queries combined using the AND operator:
Table 2. Combination Query 1
AND/OR Parenthesis Attribute Operator Values
    Code IS NOT NULL  
AND   Revision = metro
AND   Description LIKE 'A-*'
AND   Unit Weight >= 1
AND   Unit Weight <= 10
This combination will give the list of the parts that are required.
Table 3. Combination Query 2
AND/OR Parenthesis Attribute Operator Values
    Code IS NOT NULL  
AND   Revision = metro
AND   Description LIKE 'A-*'
AND (      
AND   Unit Weight >= 1
AND   Unit Weight <= 10
  )      
This combination is similar to the previous combination except that it uses parentheses to make it more readable.

Example Three - AND and OR Operator

You want to search for all the parts that have the description starting with 'GREASE', and with either Revision as 'WA' or having code in 'AIRBUS'. This can be achieved using the following search combination query:
Table 4. Combination Query
AND/OR Parenthesis Attribute Operator Values
    Description LIKE GREASE*
AND   Revision = WA
OR   Code IN AIRBUS
Note: The logical AND operator has higher precedence than the logical OR operator..