| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
|||
How to find the Grandparent of this datahi
I have some thing like id node parent 1 A null 2 B A 3 C A 4 D B 5 E D 6 F D 7 G E 8 H G 9 I H Assuming this is a product catalog, each one is a subcatalog under each subcategory , like A is the root , B and C are A's subcategories , I need to find out , given a node like I , I have to find not only the immediate , but say like grandparent's grandparent ie nth grandparent , kind of recursively finding it given a leaf level |
|
Be the first to answer this question! Click on the 'Post Reply' button below.
|
![]() |
| Thread Tools | Search this Thread |
|
|