title: hierarchy query (connect by clause)
body: <p>I'm trying to writte a query using connect by clause but I can't handle with that.</p>
  
  <p>Generally I have table:</p>
  
  <pre><code>CREATE TABLE "TESTOWA" (
      "ACCOUNT" VARCHAR2(20 BYTE), 
      "PARENT"  VARCHAR2(20 BYTE), 
      "PAYMENT" VARCHAR2(20 BYTE)
  );
  
  Insert into TESTOWA (ACCOUNT,PARENT,PAYMENT) values ('5436','5436','1');
  Insert into TESTOWA (ACCOUNT,PARENT,PAYMENT) values ('4576','3457',null);
  Insert into TESTOWA (ACCOUNT,PARENT,PAYMENT) values ('5763','5686','1');
  Insert into TESTOWA (ACCOUNT,PARENT,PAYMENT) values ('5686','5686',null);
  Insert into TESTOWA (ACCOUNT,PARENT,PAYMENT) values ('3457','5686',null);  
  </code></pre>
  
  <p>And now, what I want to do is find an accounts which payment column is not filled (even parent account)
  Every account can have parent account (parent column) which indicate to other account id.
  Maybe it will be easier if I present it on example:</p>
  
  <pre><code> ACCOUNTID | PARENT | PAYMENT
  -----------------------------
      5436   |  5436  |    1
      4576   |  3457  |  NULL
      5763   |  5643  |    1
      5686   |  5686  |    1
      3457   |  5686  |  NULL
  </code></pre>
  
  <p>First account is okay - payment column is filled.
  Second is not okay because is null - but as we can see there is a parent account so now we check (3457 account) , and again payment column is null but again there is a parent account (5686) and finally there is a payment column filled.
  So for situatios above select should not present nothing
  What if Table would looks: </p>
  
  <pre><code> ACCOUNTID | PARENT | PAYMENT
  ------------------------------
      5436   |  5436  |    1
      4576   |  3457  |  NULL
      5763   |  5643  |    1
      5686   |  5686  |  NULL
      3457   |  5686  |  NULL
  </code></pre>
  
  <p>As we can see the only one change is null next to <code>5686</code> account id, so correct select should present accounts: <code>4576, 3457, 5686</code></p>