hierarchyid::Parse
static Parse (hierarchyid::Parse)
What changes
- Input
- none or string path
- Output or change
- hierarchyid
- Return type
- SQL Server return type:hierarchyid CLR return type:SqlHierarchyId
Syntax at a glance
hierarchyid::Parse ( input )
Work example
Convert a validated hierarchy path string into a hierarchyid value.
Validate imported paths and reject malformed values before storing them.
Check your work Parse converts text to a path value and invalid hierarchy strings raise an error.
Practice SQL
Open in SQL FlowSELECT hierarchyid::Parse('/4/2/').ToString() AS normalized_path;
Open Microsoft Learn for full syntax, permissions, and details for your version.