Merging Queries

Options
Hi. I need to merge a couple of queries and am a little unsure of the criteria I should be using. We use Campaign to reflect which museum within the group that the donation is for and Fund for the particular project at that museum. I want to know every-one who has donated to Campaign A, but not if they have only given to Fund X. They need to be included if they have given to funds X and Y, but not X alone. If any-one can point me in the right direction, that would be massively appreciated. Thanks. Katie

Comments

  • Katie Watkinson:
    Hi. I need to merge a couple of queries and am a little unsure of the criteria I should be using. We use Campaign to reflect which museum within the group that the donation is for and Fund for the particular project at that museum. I want to know every-one who has donated to Campaign A, but not if they have only given to Fund X. They need to be included if they have given to funds X and Y, but not X alone. If any-one can point me in the right direction, that would be massively appreciated. Thanks. Katie
    1. Query of people who have given to CampaignA. Called QCA.

    2. Query of people who have given to FundX. Called QFX.

    3. Query of people who have given to FundX and FundY. Called QFXY.

    First merge: QFX SUB QFXY. This will give you people who have only given to fund X. Called QFXO

    Second merge: QCA SUB QFXO. This will give you people who have given to campaign A but eliminate those who have only given to Fund X.

    Obviously this sort of thing gets much more complicated if you have more than two funds involved.

  • James Andrews:
    1. Query of people who have given to CampaignA. Called QCA.

    2. Query of people who have given to FundX. Called QFX.

    3. Query of people who have given to FundX and FundY. Called QFXY.

    First merge: QFX SUB QFXY. This will give you people who have only given to fund X. Called QFXO

    Second merge: QCA SUB QFXO. This will give you people who have given to campaign A but eliminate those who have only given to Fund X.

    Obviously this sort of thing gets much more complicated if you have more than two funds involved.

    Thanks James.  I'll give it a go now. Katie.

Categories