Documents select
am 02.04.2008 10:49:44 von janurik.andrasHi,
I store data about documents in a table.
The documents belong to company employees, and have two attributes:
document type and expiry date.
So the table structure: DocID, EmployeeID, DocumentType, ExpDate
When a document expires (or will expire soon) a new one is added with
a new exp date.
So there can be several documents of the same type for an employee,
but with different exp date.
I need to write a query to select documents, but only with the latest
exp date for each type and employee.
I need to list documents for every employee and every document type,
but if there are several documents of the same type for an employee, I
need to list only the one with the latest exp date.
Can anyone help with it, please?
Thanks,
Andras