I need help in SQL to get the total hours worked on the time card if possible sum it for the entire pay period.
Here is the command i have built right now but i dont know why its not displaying the record
select personid, personnum, DURATIONDAYSQTY/3600 as amount, CURRPAYPERIODEND
from VP_EMPLOYEEV42
left join [dbo].WFCTOTAL on [dbo].WFCTOTAL.EMPLOYEEID = [dbo].[VP_EMPLOYEEV42].PERSONID
where HOMELABORLEVELNM1 = 'JP' and PAYCODEID in('1167','1163');
I hope that you can guide me on how i can make the effective date from the start of the pay period to end so that it would only capture the hours of the employees per pay period.
I also need to display as an output the total hours of the employees in one line example 200 hours for the entire month of January
sample screenshot
the above screenshot is the source and my expected output is this
thanks a lot