querying maximum date rows

  • Thread starter Thread starter Floridagal
  • Start date Start date
F

Floridagal

I have a table that has multiple salary transactions per
employee. I want to retrieve the row with the latest
salary change date. I can't use specific dates because
each employee is different and could span multiple years.
How can I retrieve the row that reflects the latest salary
change date for each employee.

TIA!
 
Create a "totals" query of your employee/salary table. "Group by" the
employeeID and set the raise/salary date column to "Max".

-Ed
 
hi,
I did a quick test on one of my history tables. it has
multiple part numbers multible dates. with the following
query, i got access to get the last invertory tranaction
of each part number.
SELECT ITR.ITR_ItemID, Last(ITR.ITR_TransDate) AS TransDate
FROM ITR
GROUP BY ITR.ITR_ItemID;
query was written in design view. i just copied the SQL
and pasted it here.
Good luck.
 
Back
Top