UFN_CAMPAIGNQUALIFICATIONSTATUS
Returns the gift aid qualification status of a campaign.
Return
Return Type |
---|
nvarchar(25) |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CAMPAIGNID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_CAMPAIGNQUALIFICATIONSTATUS
(
@CAMPAIGNID uniqueidentifier
)
returns nvarchar(25)
with execute as caller
as begin
declare @FOUND bit;
set @FOUND = 0
select
@FOUND = 1
from
dbo.GIFTAIDDISQUALIFIEDBYCAMPAIGN
where
ID = @CAMPAIGNID;
if @FOUND = 1
return 'Not qualified';
return 'Qualified';
end