SqlHierarchyId.Parse 메서드

SQL Server 2012

Converts the canonical string representation of a SqlHierarchyId node to a SqlHierarchyId value.

네임스페이스:  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 static SqlHierarchyId Parse(
	SqlString input

매개 변수

유형: System.Data.SqlTypes.SqlString
String representation of SqlHierarchyId node.

반환 값

유형: Microsoft.SqlServer.Types.SqlHierarchyId
SqlHierarchyId representing the node described canonically.

Called implicitly when a conversion from a string type to SqlHierarchyId data type occurs.

Acts as the opposite of ToString.

An exception is raised if Parsereceives a value that is not a valid string representation of a SqlHierarchyId.

This member is static.

DECLARE @StringValue AS nvarchar(4000), @hierarchyidValue AS hierarchyid
SET @StringValue = '/1/1/3/'
SET @hierarchyidValue = 0x5ADE

SELECT hierarchyid::Parse(@StringValue) AS hierarchyidRepresentation,
 @hierarchyidValue.ToString() AS StringRepresentation ;

커뮤니티 추가 항목