I've 2 tables IndexTab, ChildNodes. Index Tab has a coljumn called "Index" which gives unique value
Index
150
160
170
These values are truncated and randomly populated each execution. This table is related to below child table
ChildNodes
+----+------------+--------+
| ID | ChildValue | Parent |
+----+------------+--------+
| 1 | Child 1 | 150 |
| 2 | Child 2 | 1 |
| 3 | Child 3 | 1 |
| 4 | Child 4 | 2 |
| 5 | Child 5 | 2 |
| 6 | Child 6 | 3 |
| 7 | Child 7 | 160 |
| 8 | Child 8 | 7 |
| 9 | Child 9 | 7 |
| 10 | Child 10 | 8 |
| 11 | Child 11 | 9 |
| 12 | Child 12 | 9 |
+----+------------+--------+
Now I want the hierarchical query which is something can be written with Correlation. below is the sample which I want to write...
SELECT ChildValue, ID, Parent
FROM ChildNodes
START WITH ID = IndexTab.Index
CONNECT BY PRIOR ID = Parent