Hope this helps
DECLARE @LeaveMaster AS TABLE
(EmpId Bigint , StartUTC DateTime , EndUtc Datetime )
Declare @LeaveBegin AS Datetime
DEclare @LeaveEnd AS Datetime
DECLARE @EmpId AS Bigint
SET @LeaveBegin ='01/02/2012'
SET @LeaveEnd ='01/03/2012'
SET @EmpId=1
INSERT INTO @LeaveMaster
SELECT 1,'01/02/2012' , '01/04/2012'
IF NOT EXISTS (SELECT * FROM @LeaveMaster L
WHERE
(
( convert(varchar(50),@LeaveBegin,121)<= L.StartUTC and convert(varchar(50),@LeaveEnd,121) > =L.EndUtc)
or( convert(varchar(50),@LeaveBegin,121) between L.StartUTC and L.EndUtc)
or( convert(varchar(50),@LeaveEnd,121)between L.StartUTC and L.EndUtc)
))
INSERT INTO @LeaveMaster SELECT @EmpId,@LeaveBegin,@LeaveEnd
SELECT * FROM @LeaveMaster