1 Reply Latest reply on Oct 20, 2009 3:49 PM by VikramAwotar

    Change in bank table structure in R12


      I have created view which refers table iby_ext_bank_accounts. I want to select org_id in that view but org_id is not present in iby_ext_bank_accounts table, so I tried to use iby_pmt_instr_uses_all and iby_external_payees_all (This table have Org_id) and the query is

      SELECT *
      FROM iby_external_payees_all iep
      , iby_pmt_instr_uses_all ipi
      , iby_ext_bank_accounts ieb
      WHERE iep.ext_payee_id = ipi.ext_pmt_party_id
      AND ipi.instrument_id = ieb.ext_bank_account_id
      but i do not know if these conditions are right. Can someone help me in identifying if these joins are right? If these are not the correct can someone help me writting new query.

        • 1. Re: Change in bank table structure in R12
          Hi Chukky,

          the joins are correct and u can add the condition (in bold) as in the query below:

          SELECT *
          FROM iby_pmt_instr_uses_all uses,
          iby_external_payees_all payee,
          iby_ext_bank_accounts accts
          WHERE uses.instrument_type = 'BANKACCOUNT'
          AND payee.ext_payee_id = uses.ext_pmt_party_id
          AND payee.payee_party_id = :1
          AND uses.instrument_id = accts.ext_bank_account_id

          Hope this helps..