question

ShahPak avatar image
ShahPak asked

Monthly Time and Attendane by Shift with present absent and late..

Table 1 : STP_Employee EmpID Name ShiftID etc.. Table 2 : ATT_Attendance AttendanceID EmpID Date (Datetime) TimeIn (Datetime) TimeOut (Datetime) Table 3 : STP_Shift ShiftID ShiftTitle WorkDays (Monday,Tuesday,Wednesday,Thursday,Friday,Saturday) TotalWorkHours ( diffrence between RegularWorkHourFrom and RegularWorkHourTo) RegularWorkHourFrom RegularWorkHourTo Note : In Shift table 6 rows exist from monday to saturday. Sunday is holiday. Each row has same data like total work hours , regular work hours from and to... now i want to calculate monthly attendance report with shift roaster and it should calculate overtime and late attendance.... Expected OutPut : Empid 1 2 3 4 5 6 7 8 ...... Emp-1,P P A P P P A P: Present, A: Absent
sql-server-2012pivotcommon-table-expression
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.