Use this. This will give ur exact output
SELECT x.EmpID,x.StartDate,x.EndDate
FROM(SELECT EmpID,MIN(startdate) AS startdate ,MAX(enddate) AS EndDate FROM Duration where EmpId=3
group by EmpId UNION SELECT EmpID, MIN(startdate),MAX(ISNULL(enddate,Getdate())) As...