Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


HierarchyID


HierarchyID

Author
Message
Site Owners
Site Owners
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10095 Visits: 1
Comments posted to this topic are about the item HierarchyID
Dr. Diana Dee
Dr. Diana Dee
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3151 Visits: 143
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.

):-D
Stephanie J Brown
Stephanie J Brown
SSC Eights!
SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)SSC Eights! (808 reputation)

Group: General Forum Members
Points: 808 Visits: 1103
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
Jen-574053
Jen-574053
SSC-Enthusiastic
SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)SSC-Enthusiastic (187 reputation)

Group: General Forum Members
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
Kelsey Thornton
Kelsey Thornton
Mr or Mrs. 500
Mr or Mrs. 500 (559 reputation)Mr or Mrs. 500 (559 reputation)Mr or Mrs. 500 (559 reputation)Mr or Mrs. 500 (559 reputation)Mr or Mrs. 500 (559 reputation)Mr or Mrs. 500 (559 reputation)Mr or Mrs. 500 (559 reputation)Mr or Mrs. 500 (559 reputation)

Group: General Forum Members
Points: 559 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
Bob Griffin
Bob Griffin
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1167 Visits: 702
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.
Steve Jones
Steve Jones
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36234 Visits: 18751
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
My Blog: www.voiceofthedba.com
Dr. Diana Dee
Dr. Diana Dee
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3151 Visits: 143
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.

):-D
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search