Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mdixon44
Starting Member
26 Posts |
Posted - 2009-02-15 : 21:46:00
|
I am confused on this question and I need a little assistanceDetermine if any employee is working for a manager who was hired after that employee was hired. Show the employee_id, first_name, and hire_date of both the employee and the manager.This is what I have come up withselect emp.employee_idemp.first_name,emp.hire_date,boss.employee_idboss.hire_datefrom l_employees empleft outer join l_employees bosson emp.manager_id = boss.employee_id;My Problem is getting the hire date to show correctly for the employee and the manager. |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-15 : 22:10:11
|
Select emp.employee_idemp.first_name,emp.hire_date,boss.employee_idboss.hire_datefrom l_employees empleft outer join l_employees bosson emp.manager_id = boss.employee_id and boss.hiredate > emp.hiredate |
 |
|
|
|
|