I have a simple yet difficult recursive sql I'd like to make.
Here's the simple version:
select supervisor from hr_employee_info where eid = "xxx"; <-- EID is a given through the session variable. I'm basically going to use the same query to get the supervisor's first name and last name for the EID equal to XXX.
Now from the same table, I want to get the supervisor first_name and last_name.
Here's the columns:
eid (Employee ID)
So basically, using XXX as my parameter, I need to recursively call the same table to get the supervisors first_name and last_name. The XXX is the initials of the employee. Each employee has a supervisor assigned to them. So basically employee XXX has supervisor SSJ and SSJ's first name is Sam and the last name is Jones. You follow?
Thanks... Again, this needs to be SQL!