Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tinaarnoldi/3077561 to your computer and use it in GitHub Desktop.
Save tinaarnoldi/3077561 to your computer and use it in GitHub Desktop.
SQL Raisers Edge Gifts to specific fund
SELECT
GIFT.CONSTIT_ID, GIFT.Amount, GIFT.DTE, FUND.FUND_ID, RECORDS.FIRST_NAME, RECORDS.LAST_NAME, RECORDS.ORG_NAME, GIFT.REF
FROM
RECORDS LEFT OUTER JOIN
GIFT LEFT OUTER JOIN
FUND INNER JOIN
GiftSplit ON FUND.ID = GiftSplit.FundId ON GIFT.ID = GiftSplit.GiftId ON RECORDS.ID = GIFT.CONSTIT_ID
WHERE (FUND.FUND_ID = 'YOUR PROJECT ID OR FUND ID') AND (GIFT.DTE >= @Date)
@tinaarnoldi
Copy link
Author

This pulls data from RE, showing Gifts to a specified fund as of a certain date.

We have a default date parameter of 7 days ago for the date =DateAdd(DateInterval.Day, -7, (Today))

With a subscription in SSRS set up with this default, a notice goes to staff showing gifts to this campaign the prior week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment