Merge Operators

To determine the combination of records when you merge queries, you can combine them with the following merge operators:

  • And — Records that exist in both queries are included in the merged query.

  • Or — Records that exist in either query are included in the merged query.

  • Xor — Records that exist in either the primary or secondary query but not both only are included in the merged query.

  • Sub — Records that exist only in the primary query are included. This operator subtracts records in the secondary from the primary query. For example, you may want to create a merged query of donors that have given in the past but are not alumni.

For example, you have two queries: one of South Carolina residents and another of alumni. The results of the merged queries will vary depending on the merge operator you select:

  • And — The merged query using the And operator consists of alumni who live in South Carolina.

  • Or — The merged query using the Or operator consists of all alumni and all South Carolina residents.

  • Xor — The merged query using the Xor operator consists of South Carolina residents who are not alumni and alumni who do not live in South Carolina.

  • Sub — The merged query using the Sub operator consists of South Carolina residents who are not alumni.