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