i am working on an Attendance report were I need to create a SQL Query from one table to return the attendance of employees net hours worked over the month. Day of the month should be as a column and in the rows should be the total Hours of employee.
The Table is having 6 Columns ( Employee Name, Dept , Position, Time In , Time Out and Total Hours
Picture for Selecting * From the Attendance Table
i want to return the values as the following:
EmployeeName | 1st | 2nd | 3rd | 4th | ...... |30 June
Emp 1 | 10:30 | | 10:40 | | 10:10 | | 10:21 |
The Days column should be returned in a parameter so i can add it to crystal report.
Table Structure if you can advise please.
Thanks in advance