title: how to get the root ancestors in a hierarchy query using oracle-10g?
body: <p>the table is very simple,pid means the parent id,and cid means the child id.And there may be more than one trees in the table.So my question is:<br>
  knowing <strong><em>several</em></strong> cid,how can we get the root ancestors<br>
  here is an example</p>
  
  <p><strong>pid</strong>  <strong>cid</strong><br>
  1 2<br>
  2 3<br>
  3 4<br>
  5 6<br>
  6 7<br>
  7 8 </p>
  
  <p>given cid = 4 or cid = 8,I want to get their root ancestors whose pid is 1 ro 5<br>
  finally,I'm using an <strong><em>oracle 10g</em></strong></p>