This is an offshoot of a previous question -- I have code that looks like this
select EMPLOYEE_NAME,
HIRE_DATE,
IFNULL(SALARY,0),
manager_id,
(select ifnull(employee_name,"unkown") from employee b where b.employee_id = a.manager_id)
from employee a
order by a.EMPLOYEE_NAME;
I want the word "unkown" to appear if there is no manager value.
Basically its a large table with employee IDs and Manager IDs. (and the manager IDs are equivalent to the employee IDs) so i can get the list of those that join correctly but the blanks come out blank ... please advise.