FROM ap.ap_suppliers aps, |
ap.ap_supplier_sites_all apss, |
apps.iby_ext_bank_accounts ieba, |
apps.iby_account_owners iao, |
apps.iby_ext_banks_v ieb, |
apps.iby_ext_bank_branches_v iebb |
WHERE aps.vendor_id = apss.vendor_id |
AND iao.account_owner_party_id = aps.party_id |
AND ieba.ext_bank_account_id = iao.ext_bank_account_id |
AND ieb.bank_party_id = iebb.bank_party_id |
AND ieba.branch_id = iebb.branch_party_id |
AND ieba.bank_id = ieb.bank_party_id |
AND aps.employee_id = papf.person_id |
AND TRUNC(sysdate) BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE;