UFN_EVENT_VALIDMAINEVENT
Validates that the main event is not a supporting event of another event.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@MAINEVENTID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_EVENT_VALIDMAINEVENT
(
@MAINEVENTID uniqueidentifier = null
)
returns bit with execute as caller
as
begin
if @MAINEVENTID is not null begin
--An event that supports a main event cannot be designated as a main event
if (select MAINEVENTID from dbo.EVENT where EVENT.ID = @MAINEVENTID) is not null
return 0
else
return 1
end
return 1
end