Show child and parent together using CONNECT BY Sql statement
        Posted  
        
            by martilyo
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by martilyo
        
        
        
        Published on 2010-04-21T06:52:50Z
        Indexed on 
            2010/04/21
            7:33 UTC
        
        
        Read the original article
        Hit count: 257
        
I have an sql statement that currently is just returning all the end parent rows for a list of child rows:
  SELECT DISTINCT row
      FROM table heirarchy
      WHERE parent_row = NULL
    CONNECT BY nocycle PRIOR parent_row = row
     START WITH row IN (select statement returning child rows)
Is there a way to show the child and its corresponding parent together in the same result set using a modified version of my sql?
Thanks.
© Stack Overflow or respective owner