select de.emp_no,dm.emp_no as manager_no from dept_emp as de join dept_manager as dm on de.to_date='9999-01-01' and de.to_date=dm.to_date and de.dept_no = dm.dept_no where de.emp_no != manager_no;