Contributions and Solicitations for a given fiscal year

Former Member
Former Member $organization

Hi:

I am trying write a SQL query that will summarize the contributions and solicitations for a given fiscal year.  We have a view that gathers all of the contributtions, gifts and soft credits up very nicely.  However, when I connect the t_solicitation table and our View together via customer_no, the recd_amt value calculates incorrectly.  Does anyone know how to connect the t_solicitation table so that it does not skew the total t_contribution.recd_amt?

Any help would be greatly appreciated.

Regards,

James

Parents
  • I'm guessing that you have some patrons who have multiple solicitations within the same campaign (or fiscal year) which would cause your contribution totals to be higher than expected (due to a Cartesian result when you join to the solicitation table).

    You will need to decide how you want to deal with this if it is the case.  If someone has two solicitations, which one do you want to include in your data set? Alternately, you could try joining t_solicitation and t_contribution using customer_no, campaign_no and designation.  That should eliminate the problem as well.

Reply
  • I'm guessing that you have some patrons who have multiple solicitations within the same campaign (or fiscal year) which would cause your contribution totals to be higher than expected (due to a Cartesian result when you join to the solicitation table).

    You will need to decide how you want to deal with this if it is the case.  If someone has two solicitations, which one do you want to include in your data set? Alternately, you could try joining t_solicitation and t_contribution using customer_no, campaign_no and designation.  That should eliminate the problem as well.

Children
No Data