Advertisement
Dio64

ebs bank query

Apr 2nd, 2024 (edited)
692
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 2.48 KB | Software | 0 0
  1. SELECT cba.bank_account_name ,
  2.   cba.bank_account_id,
  3.   cba.bank_account_name_alt,
  4.   cba.bank_account_num ,
  5.   cba.multi_currency_allowed_flag ,
  6.   cba.zero_amount_allowed ,
  7.   cba.account_classification ,
  8.   bb.bank_name ,
  9.   cba.bank_id,
  10.   bb.bank_number,
  11.   bb.bank_branch_type ,
  12.   bb.bank_branch_name ,
  13.   cba.bank_branch_id ,
  14.   bb.bank_branch_number ,
  15.   bb.eft_swift_code ,
  16.   bb.description BANK_DESCRIPTION,
  17.   cba.currency_code ,
  18.   bb.address_line1,
  19.   bb.city,
  20.   bb.county,
  21.   bb.state,
  22.   bb.zip_code,
  23.   bb.country,
  24.   ou.name ,
  25.   gcf.concatenated_segments,
  26.   cba.ap_use_allowed_flag,
  27.   cba.ar_use_allowed_flag,
  28.   cba.xtr_use_allowed_flag,
  29.   cba.pay_use_allowed_flag
  30. FROM apps.ce_bank_accounts cba,
  31.   apps.ce_bank_acct_uses_all bau,
  32.   apps.cefv_bank_branches bb,
  33.   apps.hr_operating_units ou,
  34.   apps.gl_code_combinations_kfv gcf
  35. WHERE cba.bank_account_id         = bau.bank_account_id
  36. AND cba.bank_branch_id            = bb.bank_branch_id
  37. AND ou.organization_id            = bau.org_id
  38. AND cba.asset_code_combination_id = gcf.code_combination_id
  39. AND (cba.end_date                IS NULL
  40. OR cba.end_date                   > TRUNC(SYSDATE))
  41. ORDER BY TO_NUMBER(cba.bank_account_num);
  42.  
  43.  
  44.  
  45. SELECT owners.account_owner_party_id,
  46.   asp.segment1 vendor_num,
  47.   asp.vendor_name,
  48.   (SELECT NAME
  49.   FROM apps.hr_operating_units hou
  50.   WHERE 1                 = 1
  51.   AND hou.organization_id = asa.org_id
  52.   ) ou_name,
  53.   asa.vendor_site_code,
  54.   ieb.country_code,
  55.   cbbv.bank_name,
  56.   cbbv.bank_number,
  57.   cbbv.bank_branch_name,
  58.   cbbv.branch_number,
  59.   cbbv.bank_branch_type,
  60.   cbbv.eft_swift_code,
  61.   ieb.bank_account_num,
  62.   ieb.currency_code,
  63.   ieb.iban,
  64.   ieb.foreign_payment_use_flag,
  65.   ieb.bank_account_name_alt
  66. FROM apps.iby_pmt_instr_uses_all instrument,
  67.   apps.iby_account_owners owners,
  68.   apps.iby_external_payees_all payees,
  69.   apps.iby_ext_bank_accounts ieb,
  70.   apps.ap_supplier_sites_all asa,
  71.   apps.ap_suppliers asp,
  72.   apps.ce_bank_branches_v cbbv
  73. WHERE owners.primary_flag      = 'Y'
  74. AND owners.ext_bank_account_id = ieb.ext_bank_account_id
  75. AND owners.ext_bank_account_id = instrument.instrument_id
  76. AND payees.ext_payee_id        = instrument.ext_pmt_party_id
  77. AND payees.payee_party_id      = owners.account_owner_party_id
  78. AND payees.supplier_site_id    = asa.vendor_site_id
  79. AND asa.vendor_id              = asp.vendor_id
  80. AND cbbv.branch_party_id(+)    = ieb.branch_id
  81.   --and asp.vendor_name like '%ABC Emp, Name'
  82. AND asp.vendor_name LIKE 'ABCD LLC'
  83. ORDER BY 4,
  84.   1,
  85.   3 ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement