- May 27, 2002
- 12,653
- 205
- 106
So...I need help with an outer join query.
I have 3 base query's from a table on employee overtime payroll data.
the first query finds the most recent Pay period date in the table (using a top 1), then joins with the second query to select all employees overtime records based on this date.
The third query analyses each employee to give an annual summary of their overtime payroll data.
since not all employees recieve overtime each week, I then do an outer join to combine the annual & most recent data.
Employee#
most recent pay peeriod date
OT from Most recent Pay period
OT Total from this year
Here is my problem, since not everyone has OT every week, the most recent pay period date does not exist in those records with only an Annual total.
How do I get that date to fill on the remaining records?
Reason being... when the report prints, the manager wants the payroll date to be at the top of every sheet... when i group on it, and it doesnt exist in every record, there are pages where the field is left blank.
I have 3 base query's from a table on employee overtime payroll data.
the first query finds the most recent Pay period date in the table (using a top 1), then joins with the second query to select all employees overtime records based on this date.
The third query analyses each employee to give an annual summary of their overtime payroll data.
since not all employees recieve overtime each week, I then do an outer join to combine the annual & most recent data.
Employee#
most recent pay peeriod date
OT from Most recent Pay period
OT Total from this year
Here is my problem, since not everyone has OT every week, the most recent pay period date does not exist in those records with only an Annual total.
How do I get that date to fill on the remaining records?
Reason being... when the report prints, the manager wants the payroll date to be at the top of every sheet... when i group on it, and it doesnt exist in every record, there are pages where the field is left blank.
Last edited: