title: Oracle hierarchial queries
body: <p>I am trying to pull out all the hierarchy values for a particular segment in Oracle Apps(referring tables <code>applsys.fnd_flex_Value_norm_hierarchy</code> &amp; <code>applsys.fnd_flex_values</code>). I want a tree like display starting from the top parent and going down until the last descendant) something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/rD6SP.png" alt="screenshot1"></p>
  
  <p>I have been able to pull the data with repeated parents across each lines and currently formatting this manually in excel, but am sure there is a way to do this using <code>sql</code> itself but not able to do it. Please note I have already written a <code>sql</code> which gives me data as follows.</p>
  
  <p><img src="https://i.stack.imgur.com/SpSHx.png" alt="screenshot2"></p>
  
  <p>Any suggestions would be really helpful.</p>