You can view hierarchical data via SSMS. To view a textual representation of the
EmployeeHierarchy table, enter and execute the following code:
Select Name, Position, OrganizationLevel.ToString() From EmployeeHierarchy;
This will list each employee, along with his or her position and a text representation of that person's location in the hierarchy. The
ToString method returns your
HierarchyID, using a single slash character (
/) to represent the root node. Looking at Bob and Andy, you can see that they are siblings and children of Kay. Figure A-2 shows the results of the preceding query in SSMS. The third column shows each person's location in the hierarchy. The delimited string that you see is termed a ...