I have a table like this:
I have a categoryId and I want to list all the parents up the root category.
I want to find all the parents to get the complete path.
Id Name ParentId
0 root null
1 node1 0
2 node2 1
3 node3 0
4 node4 2
I want to find the path of node4 which result is:
Thanks in advance for your help.