SQL Azure Supports Hierarchyid Data Type - SQL Azure Team Blog - Site Home - MSDN Blogs

SQL Azure Supports Hierarchyid Data Type

SQL Azure Supports Hierarchyid Data Type

Rate This
  • Comments 4

While this might seem like a non-announcement, the data type hierarchyid has just been added as a supported data type with SQL Azure Service Update 3, announced here. The hierarchyid data type is used to manage hierarchical data and tables that have a hierarchical structure. For example, employee manager relationships, and thread forum data.

SQL Azure also supports the hierarchyid functions as of Service Update 3. This seems obvious; you need these functions to interact with the hierarchyid data type. However, SQL Azure doesn’t currently support the .NET CLR and many of the functions might appear to be CLR functions. While these are CLR functions, they are supported.

These are the support functions for hierarchyid:

  • GetAncestor
  • IsDescendantOf
  • ToString
  • GetDescendant
  • Parse
  • Write
  • GetLevel
  • Read
  • GetRoot
  • GetReparentedValue

Summary

Do you have questions, concerns, comments? Post them below and we will try to address them.

  • Is there an ETA for full CLR support?  

    This seems to be the only show stopper for us to try out the Azure server.  

    Geoff

  • Hierarchyid sounds interesting. I have a parent/child/child/child ... recursive relation for a Location table in my Azure database. I use EF4 which has a generated Model which internally uses a id load to get parent, children and so on.

    I'd be interested in how EF4 can take advantage of this new datatype - either automagically or with a little help from us.

  • Same question as Geoff Nordli had, except please add all of what is not supported in SQL Azure that is supported in SQL Server 2008 R2?

  • Geoff: There is no ETA for CLR support.  Gary: SQL Server/SQL Azure can be found here: msdn.microsoft.com/.../ff394115.aspx

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post