The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT substr(cp.user_concurrent_program_name,1,80)
INTO l_report_name
FROM FND_CONCURRENT_PROGRAMS_VL cp,
FND_CONCURRENT_REQUESTS cr
WHERE cr.request_id = P_CONC_REQUEST_ID
AND cp.application_id = cr.program_application_id
AND cp.concurrent_program_id = cr.concurrent_program_id;
select
decode(cont_point.phone_area_code,
null, null,
'(' || cont_point.phone_area_code || ')' ) ||
decode(cont_point.contact_point_type,'TLX',
cont_point.telex_number, cont_point.phone_number)
from
hz_contact_points cont_point,
hz_cust_account_roles car
where
car.party_id = cont_point.owner_table_id
and cont_point.owner_table_name = 'HZ_PARTIES'
and cont_point.contact_point_type not in ('EDI','EMAIL','WEB')
and car.cust_acct_site_id = address_id
and ( car.cust_account_role_id = c_contact_id
OR not exists ( select 'x'
from hz_cust_account_roles p2
where p2.cust_acct_site_id = car.cust_acct_site_id
and p2.cust_account_role_id = car.cust_account_role_id
)
)
and rownum = 1
Union
select
decode(cont_point.phone_area_code,
null, null,
'(' || cont_point.phone_area_code || ')' ) ||
decode(cont_point.contact_point_type,'TLX',
cont_point.telex_number, cont_point.phone_number)
from
hz_contact_points cont_point,
hz_cust_account_roles car
where
car.party_id = cont_point.owner_table_id
and cont_point.owner_table_name = 'HZ_PARTIES'
and cont_point.contact_point_type not in ('EDI','EMAIL','WEB')
and car.cust_account_id = customer_id
and not exists (
select 'x'
from hz_cust_account_roles p2
where p2.cust_acct_site_id = car.cust_acct_site_id)
and rownum = 1
;
select
substr(party.person_first_name,1,1) || ' ' ||
substrb(party.person_last_name,1,50),
acct_role.cust_account_role_id
into
l_contact_name,
l_contact_id
from
hz_cust_account_roles acct_role,
hz_parties party,
hz_relationships rel,
hz_role_responsibility role_res
where
acct_role.cust_account_role_id = role_res.cust_account_role_id
and acct_role.party_id = rel.party_id
and acct_role.role_type = 'CONTACT'
and rel.subject_id = party.party_id
and rel.subject_table_name = 'HZ_PARTIES'
and rel.object_table_name = 'HZ_PARTIES'
and rel.directional_flag = 'F'
and role_res.responsibility_type = 'BILL_TO'
and acct_role.cust_acct_site_id = p_address_id
and rownum = 1
;