UFN_REGISTRANT_VALIDCONSTITUENTID
Validates that the registrant is not registered for the event more than once.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@EVENTID | uniqueidentifier | IN | |
@CONSTITUENTID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_REGISTRANT_VALIDCONSTITUENTID
(
@EVENTID uniqueidentifier = null,
@CONSTITUENTID uniqueidentifier = null
)
returns bit with execute as caller
as
begin
if @CONSTITUENTID is not null
if (select count(ID) from dbo.REGISTRANT where EVENTID = @EVENTID and CONSTITUENTID = @CONSTITUENTID and ISCANCELLED = 0) > 1
return 0
return 1
end