title: oracle sql field from cross reference table
body: <p>i am novice at SQL and have problems hope you can help me :</p>
  
  <p>ORACLE 10g</p>
  
  <p><strong>table ACCOUNT</strong></p>
  
  <pre>
  +----------+----------+
  | ACCOUNTID| LBKEY    |
  +----------+----------+
  |      ... | ...      |
  |      254 | value254 |
  |      ... | ...      |
  |      401 | value401 |
  |      ... | ...      |
  |      405 | value405 |
  +----------+----------+
  </pre>
  
  <p><strong>cross reference table</strong></p>
  
  <pre>
  +----------+----------+----------+--------+
  | IDTABLE2 | ACCOUNTID|  OIDID   | VALUE  |
  +----------+----------+----------+--------+
  |      ... | ...      | ...      | ...    |
  |      475 | 401      | 4        | 40000  |
  |      476 | 405      | 4        | 35000  |
  |       ...| ...      | ...      | ...    |
  |     3000 | 254      | 5        | PARIS  |
  |     3001 | 401      | 5        | LONDON |
  |     3002 | 405      | 5        | SYDNEY |
  |       ...| ...      | ...      | ...    |
  +----------+----------+----------+--------+
  </pre>
  
  <p><strong>table OID</strong></p>
  
  <pre>
  +----------+-------------+-------------+
  | OIDID    |     OID     | DESCRIPTION |
  +----------+-------------+-------------+
  |        1 | x           | x           |
  |        2 | x           | x           |
  |        3 | x           | x           |
  |        4 | 1.3.6.1.4.1 | Post Code   |
  |        5 | 1.3.6.1.4.2 | City        |
  |        6 | x           | x           |
  |        7 | x           | x           |
  |        8 | x           | x           |
  |        9 | x           | x           |
  |       10 | x           | x           |
  +----------+-------------+-------------+
  </pre>
  
  <p><strong>Expected result</strong></p>
  
  <p>Constraint : all the ACCOUNT (LBKEY) who has one postal code(OID 4) or city code(OID 5) in the cross reference table</p>
  
  <pre>
  +----------+-------------+-------------+
  | LBKEY    |  POST CODE  |  CITY       |
  +----------+-------------+-------------+
  | value254 | null        | PARIS       |
  | value401 | 40000       | LONDON      |
  | value405 | 35000       | SYDNEY      |
  +----------+-------------+-------------+
  </pre>