Using Not in a conditional statement
You can insert Not in front of a conditional statement or a group of conditional statements. If Not is inserted in front of a group of conditional statements, it applies to all conditional statements within that group.
To insert Not in front of a conditional statement or group:
- Access the Query Builder. See Accessing the Query Builder.
- Click the Conditions tab and add all conditional statements.
- Group the conditional statements if required. See Grouping conditional statements
- Select the Not check box of a conditional statement, or the first statement in a group.
- Click to run the query.
Example
Query Builder selects contacts who live anywhere in California other than Los Angeles or San Francisco.
This is how the grid on the Conditions tab displays for this example:
Not | ( | Field | Operator | Value | Case Sens | ) | And/Or |
---|---|---|---|---|---|---|---|
NOT | ( | Contact.Address.City | equal to | Los Angeles | True | OR | |
Contact.Address.City | equal to | San Francisco | True | ) | AND | ||
Contact.Address.State | equal to | CA | True | END |
Note: A query can contain subgroups within a group. If NOT is
used in front of a group, it applies to all subgroups contained within the
group.