UFN_EVENTSEATINGSEAT_UNIQUEREGISTRANTID
Validates that the registrant is not seated more than once.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@REGISTRANTID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_EVENTSEATINGSEAT_UNIQUEREGISTRANTID
(
@REGISTRANTID uniqueidentifier = null
)
returns bit with execute as caller
as
begin
if @REGISTRANTID is not null begin
if (select count(ID) from dbo.EVENTSEATINGSEAT where REGISTRANTID = @REGISTRANTID) = 1
return 1;
else
return 0;
end
return 1;
end