SqlHierarchyId.GetDescendant Method (SqlHierarchyId, SqlHierarchyId)
Applies To: SQL Server 2016 Preview
Gets the value of a descendant SqlHierarchyId node that is greater than child1 and less than child2.
Namespace: Microsoft.SqlServer.Types
Assembly: Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)
Syntax
[SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None,
InvokeIfReceiverIsNull = false, OnNullCall = true, IsDeterministic = true,
IsPrecise = true, IsMutator = false)]
public SqlHierarchyId GetDescendant(
SqlHierarchyId child1,
SqlHierarchyId child2
)
public:
[SqlMethodAttribute(DataAccess = DataAccessKind::None, SystemDataAccess = SystemDataAccessKind::None,
InvokeIfReceiverIsNull = false, OnNullCall = true, IsDeterministic = true,
IsPrecise = true, IsMutator = false)]
SqlHierarchyId GetDescendant(
SqlHierarchyId child1,
SqlHierarchyId child2
)
[<SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None,
InvokeIfReceiverIsNull = false, OnNullCall = true, IsDeterministic = true,
IsPrecise = true, IsMutator = false)>]
member GetDescendant :
child1:SqlHierarchyId *
child2:SqlHierarchyId -> SqlHierarchyId
<SqlMethodAttribute(DataAccess := DataAccessKind.None, SystemDataAccess := SystemDataAccessKind.None,
InvokeIfReceiverIsNull := False, OnNullCall := True, IsDeterministic := True,
IsPrecise := True, IsMutator := False)>
Public Function GetDescendant (
child1 As SqlHierarchyId,
child2 As SqlHierarchyId
) As SqlHierarchyId
Parameters
child1
Type: Microsoft.SqlServer.Types.SqlHierarchyIdThe lower bound.
child2
Type: Microsoft.SqlServer.Types.SqlHierarchyIdThe upper bound.
Return Value
Type: Microsoft.SqlServer.Types.SqlHierarchyId
A SqlHierarchyId with a value greater than the lower bound and less than the upper bound.
Remarks
If parent is null, returns null.
If parent is not null, and both child1 and child2 are null, returns a descendant of parent.
If parent and child1 are not null, and child2 is null, returns a descendant of parent greater than child1.
If parent and child2 are not null and child1 is null, returns a descendant of parent less than child2.
If parent, child1, and child2 are not null, returns a descendant of parent greater than child1 and less than child2.
An exception is raised if child1 or child2 are not null and are not a descendant of parent.
If child1 >= child2, an exception is raised.
See Also
SqlHierarchyId Structure
Microsoft.SqlServer.Types Namespace
Return to top