records from tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a query from similar tables and cannot get the results I am
looking for. One table shows all pay period end dates and includes a number
or a 0 the other table only shows a date if an adjustment was made, most of
the time there will be no record at all. So on output I want a total of sick
hours by pay period and upon running this query I see all pp end dates, but
there is nothing in the sick hours column. help?

SELECT qrySubstituteLeaveStatusSick.chrSSN,
qrySubstituteLeaveStatusSick.dtePayEndDate,
+[qrySubstituteLeaveStatusSick]![decSickHours]+[qrySubstituteLeaveStatusSickADJ]![decSickHours] AS Sick
FROM qrySubstituteLeaveStatusSickADJ RIGHT JOIN qrySubstituteLeaveStatusSick
ON qrySubstituteLeaveStatusSickADJ.dteTimeStamp =
qrySubstituteLeaveStatusSick.dtePayEndDate
GROUP BY qrySubstituteLeaveStatusSick.chrSSN,
qrySubstituteLeaveStatusSick.dtePayEndDate,
+[qrySubstituteLeaveStatusSick]![decSickHours]+[qrySubstituteLeaveStatusSickADJ]![decSickHours];
 
Never Mind. I did more research and used this expression to get my data,
thanks anyway!

Reg:
Sum(nz(XXSUBqrySubstituteLeaveStatusReg!decRegHours,0+NZ(XXSUBqrySubstituteLeaveStatusRegAJU!decRegHoursPaid,0)))
 
Back
Top