|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,040,
Visits: 1
|
|
| Comments posted to this topic are about the item HierarchyID
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 3:02 PM
Points: 2,768,
Visits: 108
|
|
I was at that very page in SQL 10 Books Online: http://msdn2.microsoft.com/en-us/library/bb677290(SQL.100).aspx
And I quote: "The hierarchyid data type is a variable length, system data type." and "The hierarchyid type is available to CLR clients as the SqlHierarchyId data type."
Does the fact that the hierarchy type has methods mean it is a CLR type? That would be the only clue I could see in that article that it is a CLR type. The article never explicitly says that.
I always have trouble reading between the lines. I always need things said explicitly.
)
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: 2 days ago @ 11:46 AM
Points: 507,
Visits: 875
|
|
Ditto to what Dr Diana Dee said - I was at the same article. It feels like there is something missing here in terms of clarifying information...
Here there be dragons...,
Steph Brown
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, December 21, 2012 5:04 AM
Points: 187,
Visits: 186
|
|
In addition to providing a good summmary of the new features of sql server 2008, the following link provides a much better explanation:
http://www.windowsdevpro.com/Pages/Content/1717/1717.aspx
Kind Regards, Jen
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, March 04, 2013 4:10 AM
Points: 532,
Visits: 281
|
|
I was reading the same article, and inferred from the fact that it "is available to CLR clients as the SqlHierarchyId data type" that the CLR data type was in fact SqlHierarchyId.
The representation used in the article suggest that is is some kind of string (as it mentions slashes etc.). The fact that you convert it to nvarchar by using the ToString method made me think it must, therefore, be a varchar type...
Kelsey Thornton MBCS CITP
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 3:51 PM
Points: 1,132,
Visits: 664
|
|
Kelsey.Thornton (2/14/2008) I was reading the same article, and inferred from the fact that it "is available to CLR clients as the SqlHierarchyId data type" that the CLR data type was in fact SqlHierarchyId.
The representation used in the article suggest that is is some kind of string (as it mentions slashes etc.). The fact that you convert it to nvarchar by using the ToString method made me think it must, therefore, be a varchar type...
Agree...nvarchar or varchar also due to the size of the sqlhierarchyid making it too big to be an int. The clr type is SQLhierarchyid.
|
|
|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436,
Visits: 13,751
|
|
There isn't a great reference out there, and apologies for not getting a better one. The HierarchyID, from what I've seen from various sources, is a binary representation of a hierarchy, and it's implemented as a CLR type. The ToString() method will return a string representation with slashes, but the type itself is essentially a UDT, that's built into the system.
Follow me on Twitter: @way0utwest
 Forum Etiquette: How to post data/code on a forum to get the best help
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, April 19, 2013 3:02 PM
Points: 2,768,
Visits: 108
|
|
I don't think you should take the blame for this one. I think Books Online should be more explicit.
This was a great learning experience! I will now know that anything with methods must be a CLR type.
)
|
|
|
|