Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

HierarchyID Expand / Collapse
Author
Message
Posted Wednesday, February 13, 2008 10:12 PM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
Comments posted to this topic are about the item HierarchyID
Post #455508
Posted Wednesday, February 13, 2008 10:16 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, September 25, 2014 1:21 PM
Points: 3,143, Visits: 139
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.

)
Post #455510
Posted Wednesday, February 13, 2008 11:54 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, October 17, 2014 9:45 AM
Points: 620, Visits: 984
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
Post #455532
Posted Thursday, February 14, 2008 2:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, August 9, 2013 5:13 PM
Points: 187, Visits: 187
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
Post #455575
Posted Thursday, February 14, 2008 3:01 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, March 27, 2014 8:16 AM
Points: 534, Visits: 282
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
Post #455577
Posted Thursday, February 14, 2008 8:41 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, July 7, 2014 10:01 AM
Points: 1,136, Visits: 697
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.
Post #455751
Posted Thursday, February 14, 2008 9:17 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: 2 days ago @ 3:49 PM
Points: 31,161, Visits: 15,607
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
Post #455796
Posted Thursday, February 14, 2008 9:24 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, September 25, 2014 1:21 PM
Points: 3,143, Visits: 139
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.

)
Post #455800
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse