UFN_INTERACTION_ISOWNER
Returns true if the interaction's owner is the passed in fundraiser.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@INTERACTIONID | uniqueidentifier | IN | |
@FUNDRAISERID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_INTERACTION_ISOWNER
(
@INTERACTIONID uniqueidentifier,
@FUNDRAISERID uniqueidentifier
)
returns bit
with execute as caller
as
begin
declare @CURRENTOWNER as uniqueidentifier;
select @CURRENTOWNER = (select top 1 FUNDRAISERID from dbo.INTERACTION where ID = @INTERACTIONID);
declare @RETURNVALUE as bit
if @CURRENTOWNER = @FUNDRAISERID
select @RETURNVALUE = 1
else
select @RETURNVALUE = 0
return @RETURNVALUE
end