I have 2 tables called V_TIMESHEET& Avail Hours
V_TIMESHEET contains the following columns:
- StaffID (Numeric)
- Year-Month (Text)
- HoursCaptured (Numeric)
Avail Hours contains the following columns:
- Year-Month (Text)
- Available Hours (Numeric)
Avail Hours contains unqiue values of the Year-Month (16-03) in text while V_TIMESHEET has duplicates of Year-Month which they are joined on.
I am needing to work out the Sum of the HoursCaptured per StaffID per Year-Month then Subtract that from the Available Hours that was available for that Year-Month