
February 15th, 2012, 11:07 AM
|
 |
Contributing User
|
|
|
|
If the time_tbl will always have a record for each day then try this.
Code:
SELECT
time_date,
e.employee_id,
e.employee_name
FROM employee_tbl e
LEFT JOIN time_tbl t on e.employee_id = t.employee_id
WHERE time_date between @startdate and @enddate
AND (time_start is null or time_end is null)
|