Newbie Question – how do I link a pledge payment to its original pledge in code?
I am writing a stored procedure for reunion reporting and I need to only count pledge payments if their associated pledge was made within the current reunion cycle. If someone made a multi-year pledge during their previous reunion cycle and is still paying it off, I do not want to include those payments in the current counts/totals because the pledge total was already counted in the previous reunion.
Comments
-
The application for a pledge payment is found on the REVENUESPLIT table, join from there to INSTALLMENTSPLITPAYMENT on the REVENUESPLIT.ID = INSTALLMENTSPLITPAYMENT.PAYMENTID to find the installment and then join to the pledge which is in the revenue table by INSTALLMENTSPLITPAYMENT.PLEDGEID = REVENUE.ID
below is a snippet on how to pull all fields from the revenuesplit table with this join where the pledge data is between a couple parameters. Hope this helps --Spencer
SELECT RS.*
FROM REVENUESPLIT RS INNER JOIN
INSTALLMENTSPLITPAYMENT ISP ON RS.ID = ISP.PAYMENTID INNER JOIN
REVENUE R ON ISP.PLEDGEID = R.ID
WHERE R.DATE BETWEEN @STARTDATE AND @ENDDATE1
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 401 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 655 Blackbaud Grantmaking™
- 576 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 939 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.6K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 34 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 791 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
