UFN_DONORCHALLENGE_VALIDMAPPING
Validates matching designations for donor challenge mappings.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@DONORCHALLENGEID | uniqueidentifier | IN | |
@MATCHINGDESIGNATIONID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_DONORCHALLENGE_VALIDMAPPING
(
@DONORCHALLENGEID uniqueidentifier,
@MATCHINGDESIGNATIONID uniqueidentifier
)
returns bit with execute as caller
as
begin
declare @TYPECODE tinyint;
select
@TYPECODE = TYPECODE
from
dbo.DONORCHALLENGE
where
ID = @DONORCHALLENGEID
if @TYPECODE = 0 and @MATCHINGDESIGNATIONID is null
return 0;
else if @TYPECODE = 1 and @MATCHINGDESIGNATIONID is not null
return 0;
return 1;
end