Monday, 3 December 2018

Employee Bank Account Script oracle R12

SELECT
aps.vendor_id,
apss.vendor_site_id,
aps.vendor_name,
apss.vendor_site_code,
ieb.bank_name,
ieb.country,
iebb.bank_branch_name,
iebb.eft_swift_code,
iebb.branch_number,
ieba.bank_account_num,
ieba.bank_account_name
FROM ap.ap_suppliers aps,
per_all_people_f papf,
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;