ReportingAnalyst
MIS
Hi,
In the process of building a nested table from a adjancency table, I built indentation that would show the the hierarchy of the people in the org structure. So I have got rows with values like this:
Indentation Employee
1 4655
2 5623
2 8956
2 5629
2 5627
3 5986
3 8549
The query that got that the above result is:
Now how can i use this indentation to show the employees indented respectively in my web browser?
Thanks.
In the process of building a nested table from a adjancency table, I built indentation that would show the the hierarchy of the people in the org structure. So I have got rows with values like this:
Indentation Employee
1 4655
2 5623
2 8956
2 5629
2 5627
3 5986
3 8549
The query that got that the above result is:
Code:
SELECT TOP 100 PERCENT COUNT(s2.employee) AS indentation, s1.employee
FROM dbo.Stack1 s1 CROSS JOIN
dbo.Stack1 s2
WHERE (s1.Lft BETWEEN s2.Lft AND s2.Rgt)
GROUP BY s1.employee
ORDER BY COUNT(s2.employee)
Now how can i use this indentation to show the employees indented respectively in my web browser?
Thanks.