Katya85S
Programmer
- Jul 19, 2004
- 190
How can I select employees' last title (a record of the last promotion) from SQL server database? As employee gets promoted new record is added to the database with new EmpNum (the number gets increased).
I thought max function should do the trick, but my query brings all records.
SELECT max(tblEmpBase.EmpNum), tblEmpStatus .Title
FROM tblEmpBase INNER JOIN tblEmpStatus ON tblEmpBase.SSN= tblEmpStatus.SSN
Thank you all in advance.
I thought max function should do the trick, but my query brings all records.
SELECT max(tblEmpBase.EmpNum), tblEmpStatus .Title
FROM tblEmpBase INNER JOIN tblEmpStatus ON tblEmpBase.SSN= tblEmpStatus.SSN
Thank you all in advance.