ghansen_now
SSC Journeyman
Points: 85
More actions
February 4, 2013 at 4:44 pm
#273773
A table with a single column of HIERARCHYID.
A row might look like this:
/180/155/233/443/878/939/
How do I traverse the HIERARCHYID row and extract each seperate ID?
ie
939
878
443
Thanks
David Webb-CDS
SSCoach
Points: 17398
February 4, 2013 at 4:57 pm
#1584142
A very efficient character splitting function can be found here:
http://www.sqlservercentral.com/articles/Tally+Table/72993/
The link to the discussion in the article is also worth a read. Lots of great information to be gleaned there.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply