SELECT user_id,SUM(worked_hrs),worked_dte FROM TimeSheet where user_leave_id is null AND timesheet.user_id=106 AND timesheet.worked_dte BETWEEN '2013-11-01' AND '2013-11-30' GROUP BY worked_dte,timesheet.user_id union all SELECT t.user_id,SUM(t.worked_hrs),t.worked_dte FROM TimeSheet t join user_leave u on t.user_leave_id =u.user_leave_id where t.user_leave_id is not null and u.active_rec_in <> 0 and u.leave_status is null and t.user_id=106 AND t.worked_dte BETWEEN '2013-11-01' AND '2013-11-30' GROUP BY t.worked_dte,t.user_id
SELECT t.user_id,CEILING(SUM(t.worked_hrs)),t.worked_dte FROM TimeSheet t ...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)