UFN_SELECTION_CONSTITUENT_FINANCIALSPONSORS
Selection of all constituents that have an active sponsorship recurring gift in their name.
Return
Return Type |
---|
table |
Definition
Copy
CREATE function dbo.UFN_SELECTION_CONSTITUENT_FINANCIALSPONSORS()
returns table
as return
select distinct REVENUE.CONSTITUENTID ID
from dbo.SPONSORSHIP
inner join dbo.REVENUESPLIT on REVENUESPLIT.ID = SPONSORSHIP.REVENUESPLITID
inner join dbo.REVENUE on REVENUE.ID = REVENUESPLIT.REVENUEID
where SPONSORSHIP.STATUSCODE = 1;