UFN_SPONSORSHIPPROGRAM_ACTIVESPONSORSHIPCOUNT
Count of active sponsorships for a sponsorship program.
Return
Return Type |
---|
int |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_SPONSORSHIPPROGRAM_ACTIVESPONSORSHIPCOUNT(
@ID uniqueidentifier
)
returns int
with execute as caller
as begin
declare @COUNT int
select @COUNT = count(*)
from dbo.SPONSORSHIP
where SPONSORSHIPPROGRAMID = @ID
and STATUSCODE in(0,1)
return @COUNT
end