The following lines contain the word 'select', 'insert', 'update' or 'delete':
select ts.instrtype,
tc.card_data_level,
ts.tangibleid,
tc.instr_owner_postalcode,
tc.instr_owner_country,
tc.shipfromzip,
tc.shiptozip
from iby_batches_all b,
iby_trxn_summaries_all ts,
iby_trxn_core tc
where b.mbatchid = P_MBATCH_ID
and b.mbatchid = ts.mbatchid
and ts.trxnmid = tc.trxnmid;
select length(batchid)
into l_batchid_size
from iby_batches_all
where mbatchid = P_MBATCH_ID;
select ts.instrtype,
tc.card_data_level,
ts.tangibleid,
ts.reqtype,
tc.instr_owner_postalcode,
tc.instr_owner_country,
tc.shipfromzip,
tc.shiptozip
from iby_batches_all b,
iby_trxn_summaries_all ts,
iby_trxn_core tc
where b.mbatchid = P_MBATCH_ID
and b.mbatchid = ts.mbatchid
and ts.trxnmid = tc.trxnmid;
SELECT
mpayeeid,
TRUNC(nvl(batchclosedate, SYSDATE))
INTO
l_payee_id,
l_batch_close_date
FROM
iby_batches_all
WHERE
mbatchid = P_MBATCH_ID
;
SELECT
val.account_option_value
INTO
l_security_code
FROM
IBY_BEP_ACCT_OPT_VALS val,
IBY_BEPKEYS key,
IBY_PAYEE payee
WHERE
val.bep_account_id = key.bep_account_id
AND payee.payeeid = key.ownerid
AND val.account_option_code = 'SEC_CODE'
AND payee.mpayeeid = l_payee_id
;
* Select batch count based on the security code
* linked to the payee account (not by the
* payee id itself).
*/
SELECT
COUNT(*)
INTO
l_batch_count
FROM
IBY_BEP_ACCT_OPT_VALS val,
IBY_BEPKEYS key,
IBY_PAYEE payee,
IBY_BATCHES_ALL batch
WHERE
val.account_option_code = 'SEC_CODE'
AND
val.account_option_value = l_security_code
AND
val.bep_account_id = key.bep_account_id
AND
payee.payeeid = key.ownerid
AND
batch.mpayeeid = payee.mpayeeid
AND
TRUNC(batchclosedate) = l_batch_close_date
;
select count(*)
into l_doc_line_count
from ar_invoice_lines_v
where customer_trx_id = l_cust_trx_id;
select hl.postal_code, hl.country
into l_ship_to_zip, l_ship_to_country
from hz_locations hl,
hz_party_sites hps,
hz_cust_acct_sites_all hcasa,
hz_cust_site_uses_all hcsua,
ar_invoice_header_v arihv
where hl.location_id = hps.location_id and
hps.party_site_id = hcasa.party_site_id and
hcasa.cust_acct_site_id = hcsua.cust_acct_site_id and
hcsua.site_use_id = arihv.ship_to_site_use_id and
arihv.customer_trx_id = l_cust_trx_id;
update iby_batches_all
set SENTCOUNTERDAILY = l_batch_count
where mbatchid = P_MBATCH_ID;
select ts.instrtype,
tc.card_data_level,
ts.tangibleid,
tc.instr_owner_postalcode,
tc.instr_owner_country,
tc.shipfromzip,
tc.shiptozip
from iby_batches_all b,
iby_trxn_summaries_all ts,
iby_trxn_core tc
where b.mbatchid = P_MBATCH_ID
and b.mbatchid = ts.mbatchid
and ts.trxnmid = tc.trxnmid;
select length(batchid)
into l_batchid_size
from iby_batches_all
where mbatchid = P_MBATCH_ID;
select hl.postal_code, hl.country
into l_ship_to_zip, l_ship_to_country
from hz_locations hl,
hz_party_sites hps,
hz_cust_acct_sites_all hcasa,
hz_cust_site_uses_all hcsua,
ar_invoice_header_v arihv
where hl.location_id = hps.location_id and
hps.party_site_id = hcasa.party_site_id and
hcasa.cust_acct_site_id = hcsua.cust_acct_site_id and
hcsua.site_use_id = arihv.ship_to_site_use_id and
arihv.customer_trx_id = l_cust_trx_id;