title: Connect by prior for DB2
body: <p>I have a problem with hierarchical queries, the following query is working in Oracle, but not in DB2</p>
  
  <p>It will retrieve the destination which can be possible if we start our journey from Chicago..</p>
  
  <pre><code>SELECT   origin, departure, arrival
  FROM  schema001."FLIGHTS"
  START WITH departure = 'Chicago'
  CONNECT BY PRIOR arrival = departure;
  </code></pre>
  
  <p>Can any one help me, how can we write the query in DB2</p>
  
  <p>Thanks In Advance
  Rajesh</p>