hierarchyid

Updating "Hierarchyid" in SQL Server

I've used Hierarchyid data type in one of my tables in SQL Server. Now I want to change the father of one of the rows, but when I change that all its descendant HierarchyId's must change according to that. Is there a function to do that or I must change all of them myself. If I need to do that, what is the best way ? Thanks In advance...

Cannot insert duplicate key in object (GetReparentedValue / hierarchyid)

Hello guys/girls, Using examples I found on the web I have created a function which reparents children using the GetReparentedValue. However when I have ran the code I get the following error: Cannot insert duplicate key in object. I understand why (because I am trying to reparent the children and the new parent already has children s...

Hierarchyid Problem

Hi all, I have a table with hierarchyid column. It is like: [NAME] [PATH] Ahmet / Aliye /1/ Selen /1/1/ Erdem /2/ Bilge /2/1/ Aydin /2/2/ Tomrs /2/2/2/ I want to see NAMES like: [NAMES_WITH_HIERARCHY] Ahmet Ahmet/Aliye Ahmet/Aliye/Selen Ahmet/Erdem Ahmet/Erdem/Bilge Ahmet/Erdem/Aydin Ahmet/Erdem/Aydin/Tomrs How can i do this? ...