SQL Query for Supervisor/Employee Hierarchy with Both Direct and Indirect Reports
I have a task to create a BI Publisher report and attach additional data from different tables based on the bottom level employees. I am wondering if anyone has created a SQL query to get the HCM Supervisor/Employee hierarchy, separated by columns, like in the posted image? I have been able to pull the employee and their direct supervisor, but I haven't been able to pull the indirect supervisors in the hierarchy format below. I have seen this hierarchy as an OTBI analysis, but unfortunately OTBI won't work for this reporting requirement. Any help is appreciated!