The following lines contain the word 'select', 'insert', 'update' or 'delete':
select count(APPLICABLE_PMT_MTHD_ID)
from iby_applicable_pmt_mthds
where payment_method_code = p_method_code
and applicable_type_code = p_driver_type
and (applicable_value_to is null or applicable_value_to = p_driver_value);
select count(ap.applicable_pmt_prof_id)
from iby_applicable_pmt_profs ap,
iby_payment_profiles p
where ap.system_profile_code = p.system_profile_code
and p.payment_profile_id = p_profile_id
and ap.applicable_type_code = p_driver_type
and (ap.applicable_value_to is null OR ap.applicable_value_to = p_driver_value);
select count(ap.applicable_pmt_prof_id)
from iby_applicable_pmt_profs ap,
iby_payment_profiles p
where ap.system_profile_code = p.system_profile_code
and p.payment_profile_id = p_profile_id
and ap.applicable_type_code = 'PAYER_ORG'
and ((ap.applicable_value_to is null AND ap.applicable_value_from is null) OR
(ap.applicable_value_to = p_driver_id_value AND
ap.applicable_value_from = p_driver_type_value));
select payment_method_name
into l_method_name
from IBY_PAYMENT_METHODS_VL
where payment_method_code = p_payment_method_code;
select name
into l_le_name
from XLE_FIRSTPARTY_INFORMATION_V
where legal_entity_id = p_le_arr(i);
select name
into l_org_name
from HR_ALL_ORGANIZATION_UNITS_VL
where organization_id = p_org_arr(i).org_id;
select payment_profile_name
into l_profile_name
from IBY_PAYMENT_PROFILES
where payment_profile_id = p_ppp_id;
select bank_account_name
into l_acc_name
from CE_INTERNAL_BANK_ACCOUNTS_V
where bank_account_id = p_int_bank_acc_arr(i);
select name
into l_org_name
from HR_ALL_ORGANIZATION_UNITS_VL
where organization_id = p_org_arr(i).org_id;
select count(ap.applicable_pmt_prof_id)
into l_count
from iby_applicable_pmt_profs ap,
iby_payment_profiles p
where ap.system_profile_code = p.system_profile_code
and p.payment_profile_id = p_ppp_id
and ap.applicable_type_code = 'PAYMENT_METHOD'
and (ap.applicable_value_to is null OR ap.applicable_value_to = p_payment_method_code);
select nvl(DEFAULT_PAYMENT_DOCUMENT_ID, -1),
processing_type
into l_payment_document_id,
l_proc_type
from iby_payment_profiles
where payment_profile_id = p_ppp_id;
select 0
into l_access
from dual
where exists
(select null
from iby_payments_all
where payment_instruction_id = p_instruction_id
and org_id <> -1
and MO_GLOBAL.CHECK_ACCESS(org_id) = 'N');
select count(*)
into l_instr_sra_ok
from IBY_PAY_INSTRUCTIONS_ALL
where generate_sep_remit_advice_flag = 'Y'
and (REMITTANCE_ADVICE_CREATED_FLAG = 'N' or
IBY_FD_POST_PICP_PROGS_PVT.get_allow_multiple_sra_flag(p_instr_id) = 'Y')
and payment_instruction_status not in ('CREATION_ERROR', 'RETRY_CREATION', 'TERMINATED')
and IBY_FD_POST_PICP_PROGS_PVT.val_instruction_accessible(p_instr_id) = 'Y';
select sra_setup.remittance_advice_format_code,
f.format_name
into x_default_sra_format_code,
x_default_sra_format_name
from iby_pay_instructions_all ins,
iby_payment_profiles pp,
iby_remit_advice_setup sra_setup,
iby_formats_vl f
where ins.payment_instruction_id = p_instr_id
and pp.payment_profile_id = ins.payment_profile_id
and pp.system_profile_code = sra_setup.system_profile_code
and sra_setup.remittance_advice_format_code = f.FORMAT_CODE (+);