You need a CROSS JOIN to a calendar table.declare @tab table (EmpNo int, Employeename varchar(30), LeaveType char(2) , LeaveDays int , LeaveFromDate datetime, LeaveDate datetime)declare @cal table (dates datetime);with mycte as ( select cast('1990-01-01' as datetime) DateValue union all select DateValue + 1 from mycte where DateValue + 1 < '2050-12-31' )insert into @calselect DateValuefrom mycteOPTION (MAXRECURSION 0)insert into @tabselect 1, 'Super User','EL',6,'2011-06-09', '2011-06-16'select EmpNo , Employeename , LeaveType, datesfrom @tab across join @cal bwhere b.dates between a.LeaveFromDate and a.LeaveDate