what are datatypes of emp_start and emp_end? seeing the format looks like its varcharSELECT emp_id,status,[Date]FROM (SELECT emp_id, status, convert(datetime,emp_start,21) AS emp_start, convert(datetime,emp_end,21) AS emp_end FROM table) tCROSS APPLY dbo.CalendarTable(t.emp_start,t.emp_end,0,0) f
CalendarTable can be found in below linkhttp://visakhm.blogspot.com/2010/02/generating-calendar-table.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/