M
M Skabialka
I need help with a query for some reports.
I am tracking the amount of money we pay our contractors. Periodically the
rate changes, and contracts start and stop all the time..
So I have a table of contracts showing the begin and end date, and a table
of pay rates showing the effective date for the job code.
tblContract:
ContractNumber
ContractStartDate
ContractEndDate
ContractCompany (each uses its own rates)
e.g.
12345 3/1/03 9/30/03 ABC
12346 1/1/04 12/31/04 ABC
12360 10/1/03 9/30/04 XYZ
12360 1/1/04 9/30/04 XYZ
tblRate:
JobCode
Rate
EffectiveDate
ContractCompany
e.g.
Mngr 30.00 1/1/03 ABC
Mngr 31.00 1/1/04 ABC
Admin 11.00 10/1/03 XYZ
Admin 11.50 10/1/04 XYZ
I want to be able to run a report for the employees of one company, showing
all their work on all contracts, showing the correct rate for the period
they worked, and the total pay based on the number of hours.
However I am having a hard time getting a query to pick up only one rate
which is active during the period of the contract; I keep picking up all of
the rates so my query is wrong.
Thanks,
Mich
I am tracking the amount of money we pay our contractors. Periodically the
rate changes, and contracts start and stop all the time..
So I have a table of contracts showing the begin and end date, and a table
of pay rates showing the effective date for the job code.
tblContract:
ContractNumber
ContractStartDate
ContractEndDate
ContractCompany (each uses its own rates)
e.g.
12345 3/1/03 9/30/03 ABC
12346 1/1/04 12/31/04 ABC
12360 10/1/03 9/30/04 XYZ
12360 1/1/04 9/30/04 XYZ
tblRate:
JobCode
Rate
EffectiveDate
ContractCompany
e.g.
Mngr 30.00 1/1/03 ABC
Mngr 31.00 1/1/04 ABC
Admin 11.00 10/1/03 XYZ
Admin 11.50 10/1/04 XYZ
I want to be able to run a report for the employees of one company, showing
all their work on all contracts, showing the correct rate for the period
they worked, and the total pay based on the number of hours.
However I am having a hard time getting a query to pick up only one rate
which is active during the period of the contract; I keep picking up all of
the rates so my query is wrong.
Thanks,
Mich