Feedback

  • Contents
 

Set a Query Condition to Optional or Required

Use the Conditions pane to set a query condition to optional or required using Boolean operators (OR, AND). The query tool sets conditions to "required" by default. If a query has a single condition, the query requires that condition and you cannot set it to optional. If a query has more than one condition, you can set each condition that follows the first condition in the list to required or optional.

To set a query condition to optional or required

With a query tool window open, in the Conditions pane, do one of the following:

  • To change the query to require accounts to meet only one of the conditions for inclusion in the export file, right-click the second condition and then click Set Condition Optional. The condition changes from "and" to "or."

In the following example, if an account contract date is "February 7, 2013" but the Desk is not "Collect 1 Desk," the query results include the account. If an account contract date is not "February 7, 2013" but the Desk is "Collect 1 Desk," the query results include the account. If an account contract date is "February 7, 2013" and the Desk is "Collect 1 Desk," the query results include the account. If an account contract date is not "February 7, 2013" or the Desk is not "Collect 1 Desk," the query results don't include the account.

Conditions pane

  • To change the query to require accounts to meet all the conditions for inclusion in the export file, right-click the second condition and then click Set Condition Required. The condition changes from "or" to "and."

In the following example, both conditions must be true for an account to appear in the query results. So, if an account contract date is "February 7, 2013" and the Desk is "Collect 1 Desk," the query results include the account. If an account contract date is "February 7, 2013" but the Desk is not "Collect 1 Desk," the query results don't include the account. If an account contract date is not "February 7, 2013" but the Desk is "Collect 1 Desk," the query results don't include the account.

Conditions panel

Related Topics

Boolean Operators

Query Conditions

Queries