S
speederpro
Hi I have two tables. One that track number of hours that an employee work
(tblHoursWorked) and has a date field on it. Another table that show the
hourly rate (tblRates).
Here's an example:
tblHoursWorked
NumHours date empID
8 2007-01-05 1
5 2007-01-29 2
7 2007-02-02 2
:
:
5 2007-02-14 1
tblRates
rate effectiveDate
8 2007-01-01
5 2007-02-01
7 2007-02-13
tblRates changes randomly. What I would like is to take the correct rates to
find how much an employee makes.
therefore:
date emp pay
2007-01-05 1 64 (8*8)
2007-01-29 2 40(5*8)
2007-02-02 2 35(7*5)
2007-02-14 1 35(5*7)
is there an easy query that I can use to get this result? I would like the
query to be able to look up the rates by itself.
(tblHoursWorked) and has a date field on it. Another table that show the
hourly rate (tblRates).
Here's an example:
tblHoursWorked
NumHours date empID
8 2007-01-05 1
5 2007-01-29 2
7 2007-02-02 2
:
:
5 2007-02-14 1
tblRates
rate effectiveDate
8 2007-01-01
5 2007-02-01
7 2007-02-13
tblRates changes randomly. What I would like is to take the correct rates to
find how much an employee makes.
therefore:
date emp pay
2007-01-05 1 64 (8*8)
2007-01-29 2 40(5*8)
2007-02-02 2 35(7*5)
2007-02-14 1 35(5*7)
is there an easy query that I can use to get this result? I would like the
query to be able to look up the rates by itself.