The following lines contain the word 'select', 'insert', 'update' or 'delete':
stmt := 'select count(*) ';
SELECT customer_id
INTO l_customer_id
FROM fnd_user
WHERE user_id = p_user_id;
SELECT employee_id
INTO l_employee_id
FROM fnd_user
WHERE user_id = p_user_id;
SELECT p.party_type, party_id
INTO l_party_type, x_party_id
FROM hz_parties p, fnd_user u
WHERE u.user_id = p_user_id
AND p.party_id = u.customer_id;
SELECT object_id
INTO l_company_id
FROM hz_relationships
WHERE party_id = l_party_id
AND relationship_code in ('EMPLOYEE_OF', 'CONTACT_OF')
AND content_source_type = 'USER_ENTERED'
AND status = 'A';
SELECT p.object_id
INTO l_company_id
FROM hz_relationships p
WHERE p.subject_id = l_party_id
AND p.relationship_code in ('EMPLOYEE_OF', 'CONTACT_OF')
AND content_source_type = 'USER_ENTERED'
AND status = 'A';
SELECT party_name
INTO l_company_name
FROM hz_parties
WHERE party_id = l_company_id;
select cust_account_id, account_number
from HZ_CUST_ACCOUNTS
where status = 'A'
and cust_account_id in
(select cust_account_id
from HZ_CUST_ACCOUNT_ROLES
where party_id = p_customer_id
and current_role_state = 'A')
order by account_number;
select r.cust_account_id, r.account_number
from hz_cust_accounts r, hz_cust_account_roles s
where r.cust_account_id = s.cust_account_id
and s.current_role_state = 'A'
and s.party_id = p_customer_id
order by r.account_number;
select cust_account_id, account_number
from HZ_CUST_ACCOUNTS
where status = 'A'
and party_id = p_company_id
and cust_account_id in
(select cust_account_id
from HZ_CUST_ACCOUNT_ROLES
where party_id = p_customer_id
and current_role_state = 'A');
select r.cust_account_id, r.account_number
from hz_cust_accounts r, hz_cust_account_roles s
where r.cust_account_id = s.cust_account_id
and s.current_role_state = 'A'
and s.party_id = p_customer_id
and r.party_id = p_company_id
order by r.account_number;
-- the bin does not exist (maybe deleted)
l_bin_info.bin_id := null;