The following lines contain the word 'select', 'insert', 'update' or 'delete':
select distinct salesforce_id
from as_accesses_all
where lead_id is null
and sales_lead_id is null
and team_leader_flag = 'Y'
and customer_id = p_cust_id;
select party_type
from hz_parties
where party_id = p_cust_id;
select subject_id, object_id
from hz_relationships
where party_id = p_rel_party_id;
select distinct salesforce_id
from as_accesses_all
where lead_id is null
and sales_lead_id is null
and team_leader_flag = 'Y'
and customer_id in (p_subject_id, p_object_id);
-- all resources with update access on the sales team of either
-- the subject or the object of the relationship
for res_rec in get_resources_for_rel(l_subject_id,l_object_id) loop
l_index := l_index + 1;
-- all resources with update access on the sales team of the party
for res_rec in get_resources_for_party(p_party_id) loop
l_index := l_index + 1;
select distinct arc.resource_id
from ast_rs_campaigns arc, ams_campaign_schedules_b cs
where arc.campaign_id = cs.schedule_id
and cs.source_code = p_source_code
and arc.status = 'A'
and arc.enabled_flag = 'Y'
union
select distinct gm.resource_id
from ast_grp_campaigns agc, ams_campaign_schedules_b cs, jtf_rs_group_members gm, jtf_rs_groups_denorm gd
where agc.campaign_id = cs.schedule_id
and cs.source_code = p_source_code
and agc.enabled_flag = 'Y'
and agc.group_id = gd.parent_group_id
and gd.group_id = gm.group_id;
select owner_table_id
from hz_contact_points
where transposed_phone_number like p_ANI
and owner_table_name = 'HZ_PARTIES'
and status = 'A';
select party_id
from hz_parties
where party_id = p_PartyID;
select party_id
from hz_parties
where party_number = p_PartyNum;
select party_id
from aso_quote_headers_all
where quote_number = p_QuoteNum
;
select a.party_id
from oe_order_headers_all o, hz_cust_accounts a
where o.order_number = p_OrderNum
and a.cust_account_id = o.sold_to_org_id;
select nvl(car.party_id, ca.party_id)
-- from ams_request_history
-- where order_id = p_CollRequest;
select party_id, cust_account_id
from hz_cust_accounts
where account_number = p_AccountNum;
select cust_account_id
from hz_cust_account_roles
where cust_account_id = p_AccountID;
select registrant_party_id
from ams_event_registrations
where confirmation_code = p_EvRegCode;
select party_id
from ams_list_entries
where pin_code = p_MPin;
select to_number(p.object1_id1)
from okc_k_party_roles_b p , okc_k_headers_b k
where k.contract_number = p_ContractNum
and k.contract_number_modifier = nvl(p_ContractNumMod, k.contract_number_modifier)
and k.id = p.dnz_chr_id
and p.primary_yn = 'Y'
and p.jtot_object1_code = 'OKX_PARTY';
select owner_party_id
from csi_item_instances
where instance_number = p_ServiceKey
and owner_party_source_table = 'HZ_PARTIES';
select customer_id
from cs_incidents_all_b
where incident_number = p_SRNum;
select party_name
from hz_parties
where party_id = p_PartyID;