i have tried many things but the best i have is following query that uses cross join with holidays table after adding rows for all dates in holidays (holidays table now looks as calendar)SELECT DRVD.empid,DRVD.calendardate,DRVD.holidaytype, attendance.workhours FROM attendance RIGHT OUTER JOIN (SELECT * FROM employees CROSS JOIN calendar WHERE calendardate < getdate()) DRVD ON attendance.empid=DRVD.empid AND attendance.workdate=DRVD.calendardate