title: Oracle flex value hierarchy SQL query for oracle ebs r12 report
body: <p>I am new to oracle and oracle ebs and I need some help.</p>
  
  <p>I am doing a report in oracle ebs r12 and I need to list flex values from fnd_flex_values_vl view in a hierarchical way using a SQL query. It doesn`t necessary has to be a hierarchial query. Any query will do. I just need a SQL statement that will return me flex values in their hierarchial way. </p>
  
  <p>There are two objects, that store information about flex values hierarchy. It is FND_FLEX_VALUE_NORM_HIERARCHY (table) and fnd_flex_value_children_v (view). I assume one of these is enough, since fnd_flex_value_children_v is made using FND_FLEX_VALUE_NORM_HIERARCHY and some other objects.</p>
  
  <p>However, the problem I faced is, that several parents may be listed for one flex value and that I need to find all top parents or leaves in order to do an up-bottom or bottom-up hierarchy. As far as I understand fnd_flex_value_children_v doesn`t necessary store top parents (stores only children). </p>
  
  <p>Also it seems that there is probably not one, but there may be multiple hierarchies (if so, I need to list them all in one query).</p>
  
  <p>Your help will be really appreciated. I`ve been struggling with this one quite a while.
  Thank you very much for your attention. </p>
  
  <p>Best regards, new user. =)</p>