Hello - I have the following SQL in a query...
SELECT qryFlashHoursRP.WorkDate, qryFlashHoursRP.WeekEnding, qryFlashHoursRP.ReportOrder, qryFlashHoursRP.WorkCategorySubGrouping, qryFlashHoursRP.Hours, qryAdditionalGenOpsHours.AdditionalHours, Nz([Hours])+Nz([AdditionalHours]) AS RPHours
FROM qryFlashHoursRP LEFT JOIN qryAdditionalGenOpsHours ON (qryFlashHoursRP.WorkCategorySubGrouping = qryAdditionalGenOpsHours.WorkCategorySubGrouping) AND (qryFlashHoursRP.WorkDate = qryAdditionalGenOpsHours.WorkDate);
But the results are not correct. Even thought I have a left join on the two queries the results only show the records where the field "WorkCategorySubGrouping" match.
Can anyone shed some light as to what I have wrong in this query? I have another query with different queries but the same design and it works fine so I'm confused.
Thank you in advance!
SELECT qryFlashHoursRP.WorkDate, qryFlashHoursRP.WeekEnding, qryFlashHoursRP.ReportOrder, qryFlashHoursRP.WorkCategorySubGrouping, qryFlashHoursRP.Hours, qryAdditionalGenOpsHours.AdditionalHours, Nz([Hours])+Nz([AdditionalHours]) AS RPHours
FROM qryFlashHoursRP LEFT JOIN qryAdditionalGenOpsHours ON (qryFlashHoursRP.WorkCategorySubGrouping = qryAdditionalGenOpsHours.WorkCategorySubGrouping) AND (qryFlashHoursRP.WorkDate = qryAdditionalGenOpsHours.WorkDate);
But the results are not correct. Even thought I have a left join on the two queries the results only show the records where the field "WorkCategorySubGrouping" match.
Can anyone shed some light as to what I have wrong in this query? I have another query with different queries but the same design and it works fine so I'm confused.
Thank you in advance!