Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
select Hierarchy from [IMPS].[dbo].[test1] ORDER BY  CAST('/' + Hierarchy + '/' AS  HIERARCHYID) 



when i run above query it run in
SQL Server Developer edition 2008 R2



& on
SQL server standard edition 2008 R2


it gives me an error that


Type HIERARCHYID is not a defined system type.


how to use hierarchyid in
SQL server standard edition 2008 R2
Posted

1 solution

Try
select CAST('/' + Hierarchy + '/' AS  HIERARCHYID) AS Hierarchy from [IMPS].[dbo].[test1] ORDER BY Hierarchy
 
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