Skip to content
Advertisement

Count Data each shift schedule

Hi i’m trying to write query that will give me the count of duration that is greater than 10 each employee depending on his/her Shift schedule from tblshiftsched.

tbleventlogs

tblemployeegroup

tblshiftsched

i able to count data but its by each date and my problem is i only capture Shift A and Shift B because i get the data per day and Shift C takes 2 day

if the user is Shift C i on march 2 10 PM to March 3 6 AM it spans days

Note this is related to my previous question my previous question

Hope you understand what i mean

UPDATE i have the query but i i can’t identify if the employee is early/late IN or early/late OUT. So if he is late out on shift A it count as shift B because he out on the time of Shift B.

Advertisement

Answer

Your query does not capture any shift, try something like this:

(I did not try the code, so may have left a ‘(‘ or something like that, I also left the to_date and did not extract the HH component just in case you have other formats than shown)

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement