I have a table as shown below.
The table is:
EmpId Week Year Day0 Day1 ..... Day14
100 20 2005 8 8 8
200 22 2003 0 0 8
300 25 2004 8 8 0
400 06 2005 0 8 8
500 08 2002 8 0 8
I am trying to select emp records as follows:
EmpId, Date of the day, Hours worked per day
Firstly, I have to calculate date of the day of a record using
week of the year and year. Then I have to increment the day by 1, 2 ...14
to get the hours worked for each particular date
Example: If week 20 of 2005 is 05/07/2005, then
05/07/2005 has 8 hrs. 05/08/2005 hrs 8 hrs and so on as given in the table.
Finally I have to print individual rows like this:
EmpId, Date of the day, Hours worked per day
Can someone help? Thank you.
The table is:
EmpId Week Year Day0 Day1 ..... Day14
100 20 2005 8 8 8
200 22 2003 0 0 8
300 25 2004 8 8 0
400 06 2005 0 8 8
500 08 2002 8 0 8
I am trying to select emp records as follows:
EmpId, Date of the day, Hours worked per day
Firstly, I have to calculate date of the day of a record using
week of the year and year. Then I have to increment the day by 1, 2 ...14
to get the hours worked for each particular date
Example: If week 20 of 2005 is 05/07/2005, then
05/07/2005 has 8 hrs. 05/08/2005 hrs 8 hrs and so on as given in the table.
Finally I have to print individual rows like this:
EmpId, Date of the day, Hours worked per day
Can someone help? Thank you.