SqlHierarchyId.GetReparentedValue 메서드

SQL Server 2012

Gets a value representing the location of a new SqlHierarchyId node that has a path from newRoot equal to the path from oldRoot to this, effectively moving this to the new location.

네임스페이스:  Microsoft.SqlServer.Types
어셈블리:  Microsoft.SqlServer.Types(Microsoft.SqlServer.Types.dll)

[SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None, 
	InvokeIfReceiverIsNull = false, OnNullCall = false, 
	IsDeterministic = true, IsPrecise = true, IsMutator = false)]
public SqlHierarchyId GetReparentedValue(
	SqlHierarchyId oldRoot,
	SqlHierarchyId newRoot

매개 변수

유형: Microsoft.SqlServer.Types.SqlHierarchyId
An ancestor of the SqlHierarchyId node specifying the endpoint of the path segment that is to be moved.
유형: Microsoft.SqlServer.Types.SqlHierarchyId
The SqlHierarchyId node that represents the new ancestor of this.

반환 값

유형: Microsoft.SqlServer.Types.SqlHierarchyId
A SqlHierarchyId node representing the new hierarchical location of this. Will return null if oldRoot, newRoot, or thisare null.

Returns a node whose path from the root is the path to newRoot, followed by the path from oldRoot to this.

The SqlHierarchyId data type represents but does not enforce the hierarchical structure. Users must ensure that the SqlHierarchyId node is appropriately structured for the new location.

커뮤니티 추가 항목