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
- 2 Blackbaud Agents for Good™
- Raiser's Edge NXT test
- 6 Blackbaud Community Help
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 403 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.2K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 16 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 664 Blackbaud Grantmaking™
- 583 Blackbaud Education Management Solutions for Higher Education
- 3.3K Blackbaud Education Management Solutions for K-12 Schools
- 947 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.8K Blackbaud Raiser's Edge NXT®
- 3.8K SKY Developer
- 251 ResearchPoint™
- 120 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 243 Member Lounge (Just for Fun)
- 37 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Closed) PowerUp Challenge: Grid View Batch
- 3 (Closed) 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
- 804 Community News
- 3K Jobs Board
- 57 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
