Hi
I have an employee table which has employee Overtime hours worked information
The employees work only for 3 days overtime (Monday , Tuesday , Wednesday)
The table is like
EmpID Day OvertimeHoursworked
----------------------------------------------
101 Monday 4
101 Tuesday 2
101 Wednesday 4
102 Monday 3
102 Tuesday 3
102 Wednesday 2
103 Monday 1
103 Tuesday 5
103 Wednesday 3
I would like to display the weekday rows as columns
I would like to write a SELECT query which gives me a result like this
EmpId MondayOvertime TuesdayOvertime WedOvertime
------------------------------------------------------
101 4 2 4
102 3 3 2
103 1 5 3
How do I get this ? Please suggest
I have an employee table which has employee Overtime hours worked information
The employees work only for 3 days overtime (Monday , Tuesday , Wednesday)
The table is like
EmpID Day OvertimeHoursworked
----------------------------------------------
101 Monday 4
101 Tuesday 2
101 Wednesday 4
102 Monday 3
102 Tuesday 3
102 Wednesday 2
103 Monday 1
103 Tuesday 5
103 Wednesday 3
I would like to display the weekday rows as columns
I would like to write a SELECT query which gives me a result like this
EmpId MondayOvertime TuesdayOvertime WedOvertime
------------------------------------------------------
101 4 2 4
102 3 3 2
103 1 5 3
How do I get this ? Please suggest