Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am getting an error for below query for "sql server 2005"

Error:
Type hierarchyid is not a defined system type.


XML
<pre>HierarchyID Data Type</pre>

<pre> select *from [TestingDB].[dbo].[Table_1] ORDER BY CAST('/' + id + '/' AS hierarchyid)</pre>

As i know that it is featured provided by sql server 2008 R2 so that i got above error for <pre>"sql server 2005"</pre>

How can i used it for <pre>"sql server 2005"</pre>



Please help

Thanks to all for their valuable time for looking into this issue..

Regards,

Nitin
Posted
Updated 25-Dec-13 0:05am
v3

1 solution

You an try with common table expressions

Refer this.

Common Table Expression to find all related nodes[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900