0

I have a table which will have hierarchical data as given below:

**childtype chidvalue parenttype parentvalue**

  1001, child1, 1000, testParent  
  1001, child2, 1000, testParent  
  1002, child3, 1000, testParent  
  1003, child4, 1002, child3   
  1004, child5, 1003, child4  

The input will be the parent value.For example 'testParent' and it has to fetch all records which contains the child values of 'testParent' recursivley. The number of sub levels is not known before. And I have to achieve this by using a single SQL query. Can anyone help please

Thanks in advance

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
user1407668
  • 587
  • 5
  • 20
  • 35
  • I don't believe you can do this in a single query in TimesTen. Oracle supports something called `connect by`, but TimesTen does not support this (according to http://docs.oracle.com/cd/E11882_01/timesten.112/e21634/oracle_tt.htm). – Gordon Linoff Jun 06 '13 at 13:33
  • Single query in the sense , we can use union or any other thing similar to that – user1407668 Jun 07 '13 at 09:27

0 Answers0