I would like to turn this query to regular inline sql without using stored procedures
declare @nod hierarchyid
select @nod = DepartmentHierarchyNode
from Organisation
where DepartmentHierarchyNode = 0x6BDA
select *
from Organisation
where @nod.IsDescendantOf(DepartmentHierarchyNode) = 1
Is there a way to do it?