I need to create a hieararchical XML from oracle table data, For Example: EMP. In my actual scenario, the entire data is coming from a view. In the EMP case, it is coming from Employee table.
Please find attached the sample xml output file. I masked my original data and may not look like a typical XML file. Basically, I need to group all the employees under one department and subgroup them under one MGR. I was able to generate the XML without the grouping. For example if there are 3 employees under deptno 10 and MGR 7839. Deptno 10 and MGR 7839 are also repeated for each employee.
Please help me with the query to generate the xml.
Thanks in advance.