The following lines contain the word 'select', 'insert', 'update' or 'delete':
select location_id, geometry, geometry_status_code
into p_loc_array(i).location_id, p_loc_array(i).geometry, p_loc_array(i).geometry_status_code
from ap_exp_locations
where address_key = p_loc_array(i).address_key;
select ap_exp_locations_s.nextval
into p_loc_array(i).location_id
from dual;
insert into ap_exp_locations
( location_id,
address_key,
address1,
address2,
address3,
address4,
city,
province_state,
postal_code,
country,
geometry,
geometry_status_code,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
org_id )
values
( p_loc_array(i).location_id,
p_loc_array(i).address_key,
p_loc_array(i).address1,
p_loc_array(i).address2,
p_loc_array(i).address3,
p_loc_array(i).address4,
p_loc_array(i).city,
p_loc_array(i).province_state,
p_loc_array(i).postal_code,
p_loc_array(i).country,
p_loc_array(i).geometry,
p_loc_array(i).geometry_status_code,
user_id,
todays_date,
user_id,
todays_date,
login_id,
mo_global.get_current_org_id() );
select site.country
into l_country
from ap_card_programs_all card,
ap_supplier_sites_all site
where card.vendor_site_id = site.vendor_site_id
and card.card_program_id = p_card_program_id;
select curr.issuing_territory_code
into l_country
from ap_card_programs_all card,
fnd_currencies curr
where card.card_program_id = p_card_program_id
and card.card_program_currency_code = curr.currency_code;
select loc.country
into l_country
from hr_all_organization_units org,
hr_locations loc,
ap_card_programs_all p
where org.location_id = loc.location_id
and org.organization_id = p.org_id
and p.card_program_id = p_card_program_id;
select org_id into p_location.org_id
from ap_card_programs_all
where card_program_id = p_card_program_id;