Get Credit Card Number for an invoice (oracle 11i)
/*
Description: This script will find the credit card number
for an invoice number (oracle 11i)
Author: Jay Gopa l/ Jiltin
Input: &&inv_no
*/
select
rc.customer_name customer,
rct.trx_number invoice_number,
apa.bank_account_id,
apa.bank_account_name bank_name,
apa.bank_account_num credit_card_number,
to_char(apa.inactive_date,’dd-mon-yyyy’) credit_validaity_date,
rct.invoice_currency_code,
rct.org_id
from
ap_bank_accounts_all apa,
ra_customer_trx_all rct,
ra_customers rc
where 1=1
and apa.bank_account_id = rct.customer_bank_account_id
and rc.customer_id = rct.bill_to_customer_id
and rct.trx_number in (’&&inv_no‘);