USP_DATALIST_EVENTCONFLICTBYDATETIME

Returns all of the event conflicts for a given start datetime, end datetime, locations, and resources.

Parameters

Parameter Parameter Type Mode Description
@STARTDATE datetime IN Start date
@STARTTIME UDT_HOURMINUTE IN Start time
@ENDDATE datetime IN End date
@ENDTIME UDT_HOURMINUTE IN End time
@LOCATIONS xml IN Locations
@RESOURCES xml IN Supplies/Equipment resources
@STAFFRESOURCES xml IN Staff resources
@IGNORERECORDID uniqueidentifier IN Ignore record ID
@IGNORESUBRECORDID uniqueidentifier IN Ignore subrecord ID
@IGNORESUPERRECORDID uniqueidentifier IN Ignore superrecord ID
@OFFSETRESOURCES xml IN Offset resources
@OFFSETSTAFFRESOURCES xml IN Offset staffing resources
@IGNORESUPERRECORD bit IN
@IGNORERECORD bit IN
@IGNORESUBRECORD bit IN
@IGNORERECORDSUBRECORDS bit IN

Definition

Copy


                CREATE procedure dbo.USP_DATALIST_EVENTCONFLICTBYDATETIME
                (
                    @STARTDATE datetime,
                    @STARTTIME UDT_HOURMINUTE,
                    @ENDDATE datetime,
                    @ENDTIME UDT_HOURMINUTE,
                    @LOCATIONS xml,
                    @RESOURCES xml,
                    @STAFFRESOURCES xml,
                    @IGNORERECORDID uniqueidentifier = null,
                    @IGNORESUBRECORDID uniqueidentifier = null,
                    @IGNORESUPERRECORDID uniqueidentifier = null,
                    @OFFSETRESOURCES xml = null,
                    @OFFSETSTAFFRESOURCES xml = null,
                    @IGNORESUPERRECORD bit = 1,
                    @IGNORERECORD bit = 1,
                    @IGNORESUBRECORD bit = 1,
                    @IGNORERECORDSUBRECORDS bit = 0
                )
                as
                set nocount on;

                    declare @START datetime;
                    declare @END datetime;

                    set @START = dbo.UFN_DATE_ADDHOURMINUTE(dbo.UFN_DATE_GETEARLIESTTIME(@STARTDATE),@STARTTIME);
                    set @END   = dbo.UFN_DATE_ADDHOURMINUTE(dbo.UFN_DATE_GETEARLIESTTIME(@ENDDATE),@ENDTIME);

                    select 
                        RECORDID,
                        PAGEID,
                        PROGRAMID,
                        NAME,
                        STARTDATE,
                        ENDDATE,
                        STARTTIME,
                        ENDTIME,
                        LOCATIONS,
                        RESOURCES,
                        STAFFRESOURCES,
                        ISLOCATIONCONFLICT,
                        ISRESOURCECONFLICT,
                        ISSTAFFRESOURCECONFLICT,
                        SUBRECORDID,
                        LOCATIONSINCONFLICT,
                        RESOURCESINCONFLICT,
                        STAFFRESOURCESINCONFLICT,
                        RECORDTYPE,
                        DISTINCTLOCATIONSINCONFLICT,
                        DISTINCTRESOURCESINCONFLICT,
                        DISTINCTSTAFFRESOURCESINCONFLICT
                    from dbo.UFN_CONFLICTCHECK_GETCONFLICTINFO
                    (
                        @START, @END,
                        @LOCATIONS, @RESOURCES, @STAFFRESOURCES,
                        @IGNORESUPERRECORDID, @IGNORERECORDID, @IGNORESUBRECORDID,
                        @IGNORESUPERRECORD, -- Ignore Super Record, Will only ignore if Super Record ID is not null

                        @IGNORERECORD, -- Ignore Record, Will only ignore if Record ID is not null

                        @IGNORESUBRECORD, -- Ignore Subrecord, Will only ignore if Sub Record ID is not null

                        @IGNORERECORDSUBRECORDS, -- Ignore all subrecords of record, For Copy Itinerary and Load Track

                        @OFFSETRESOURCES,
                        @OFFSETSTAFFRESOURCES
                    )