Hi,
I have the following query:
SELECT p.employee_code , p.employee_name ,
CONVERT(VARCHAR (12),t.tran_dat e,101) AS TranDate,
CONVERT(VARCHAR (12),t.post_dat e,101) AS PostDate, SUM(tobill_hrs) AS
TotalHours
FROM tat_time t, hbm_persnl p
WHERE t.tk_empl_uno = p.empl_uno AND t.tran_date BETWEEN '2005-03-01'
AND '2005-03-31' AND p.employee_code IN ('0340')
GROUP BY p.employee_code , p.employee_name , t.tran_date, t.post_date
ORDER BY p.employee_code
I would like to sum the tobill_hrs by week (Monday-Sunday) instead of
by day. For instance the user will put in a date range (a from date
and to date).
Is this possible to do?
Thanks!
I have the following query:
SELECT p.employee_code , p.employee_name ,
CONVERT(VARCHAR (12),t.tran_dat e,101) AS TranDate,
CONVERT(VARCHAR (12),t.post_dat e,101) AS PostDate, SUM(tobill_hrs) AS
TotalHours
FROM tat_time t, hbm_persnl p
WHERE t.tk_empl_uno = p.empl_uno AND t.tran_date BETWEEN '2005-03-01'
AND '2005-03-31' AND p.employee_code IN ('0340')
GROUP BY p.employee_code , p.employee_name , t.tran_date, t.post_date
ORDER BY p.employee_code
I would like to sum the tobill_hrs by week (Monday-Sunday) instead of
by day. For instance the user will put in a date range (a from date
and to date).
Is this possible to do?
Thanks!
Comment