UFN_EVENTCONFLICT_ALLOWUNDOLASTRUN
This function tells us whether this group of event conflicts are part of the last run and hence allowable to be undone.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_EVENTCONFLICT_ALLOWUNDOLASTRUN
(
@ID uniqueidentifier
)
returns bit
with execute as caller
as begin
if exists(
select ID from dbo.EVENTCONFLICT
where SCHEDULEID in (select scheduleid from dbo.EVENTCONFLICT
where DATEADDED in(select Max(DATEADDED) from dbo.EVENTCONFLICT))
and ID=@ID
) return 1;
return 0;
end