Hi MMartin1,
We need to seed the root node first.. This has come in screenshot but not in code.
INSERT INTO @Hierarchy (ID, ParentID, Name, Level)
SELECT ID, ParentID, Name, 1
FROM HierarchyBig
WHERE ParentID IS NULL;
Thanks for pointing that out . I’ll request an update to reflect the correct version. Appreciate the feedback!