hokiewalrus
Registered User.
- Local time
- Today, 09:15
- Joined
- Jan 19, 2009
- Messages
- 50
I've been running around with this for the past 2 days but I really don't think I have the query chops I should to unravel it.
The background:
2 Tables, first holds PayrollNumber, WorkTimeIn, WorkTimeOut, and WorkDate. The second holds any adjustments to those entries called AdjustmentHours (linked to WorkTime table via 1-many). Adjustments are made for several reasons, including auto deductions for lunch and mistakes. Work Time is held by actual times, adjustments are just the number of hours to add or subtract.
The problem:
I need to write a query that will return the sum of WorkTimeOut-WorkTimeIn+AdjustmentHours, grouped by PayrollNumber, based on a WorkDate the user enters. Not all WorkTimes have adjustments, which is screwing me up.
Obviously I don't want to store any calculated values, but I can't figure it all out.
Simple payroll query, right? All I want is to type in a date and have the total hours each employee worked for that day, yet my brain seems to be fried. Any help would be most appreciated, thanks in advance.
The background:
2 Tables, first holds PayrollNumber, WorkTimeIn, WorkTimeOut, and WorkDate. The second holds any adjustments to those entries called AdjustmentHours (linked to WorkTime table via 1-many). Adjustments are made for several reasons, including auto deductions for lunch and mistakes. Work Time is held by actual times, adjustments are just the number of hours to add or subtract.
The problem:
I need to write a query that will return the sum of WorkTimeOut-WorkTimeIn+AdjustmentHours, grouped by PayrollNumber, based on a WorkDate the user enters. Not all WorkTimes have adjustments, which is screwing me up.
Obviously I don't want to store any calculated values, but I can't figure it all out.
Simple payroll query, right? All I want is to type in a date and have the total hours each employee worked for that day, yet my brain seems to be fried. Any help would be most appreciated, thanks in advance.