The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT gl.name
INTO l_ledger_name
FROM hr_organization_information o1,
hr_organization_information o2,
gl_ledgers_public_v gl
WHERE o1.organization_id = o2.organization_id
AND o1.organization_id = p_operating_unit
AND o1.org_information_context = 'CLASS'
AND o2.org_information_context = 'Operating Unit Information'
AND o1.org_information1 = 'OPERATING_UNIT'
AND o1.org_information2 = 'Y'
AND o2.org_information3 = gl.ledger_id;
SELECT to_number(o2.org_information3),
gl.name
INTO l_ledger_id,
l_ledger_name
FROM hr_organization_information o1,
hr_organization_information o2,
gl_ledgers_public_v gl
WHERE o1.organization_id = o2.organization_id
AND o1.organization_id = p_operating_unit
AND o1.org_information_context = 'CLASS'
AND o2.org_information_context = 'Operating Unit Information'
AND o1.org_information1 = 'OPERATING_UNIT'
AND o1.org_information2 = 'Y'
AND o2.org_information3 = gl.ledger_id;
SELECT mg.organization_id
, mg.organization_name
INTO l_default_org_id
, l_default_ou_name
FROM mo_glob_org_access_tmp mg;
l_tb_sql := ' SELECT DISTINCT org_id '
|| ' FROM '
|| p_table_name
|| ' where 1=1 '
|| p_where;
SELECT security_profile_name
, business_group_id
, view_all_organizations_flag
INTO l_sp_name
, l_bg_id
, is_view_all_org
FROM per_security_profiles
WHERE security_profile_id = to_number(l_security_profile_id);
SELECT 'Y'
INTO l_org_exists
FROM hr_operating_units
WHERE business_group_id = l_bg_id
AND organization_id = p_org_id;
SELECT 'Y'
INTO l_org_exists
FROM per_business_groups
WHERE organization_id = p_org_id
AND business_group_id = l_bg_id;
SELECT 'Y'
INTO l_org_exists
FROM hr_operating_units
WHERE organization_id = p_org_id;
SELECT 'Y'
INTO l_org_exists
FROM per_business_groups
WHERE organization_id = p_org_id;
SELECT 'Y'
INTO l_org_exists
FROM per_organization_list per,
hr_operating_units ou
WHERE per.organization_id = ou.organization_id
AND per.security_profile_id = l_security_profile_id
AND ou.organization_id = p_org_id;
SELECT 'Y'
INTO l_org_exists
FROM per_organization_list per,
per_business_groups bg
WHERE per.organization_id = bg.organization_id
AND per.security_profile_id = l_security_profile_id
AND bg.organization_id = p_org_id;
select distinct ou.organization_id , ou.business_group_id from hr_operating_units ou
where ou.set_of_books_id =p_ledger_id ;
SELECT hr.NAME
INTO l_org_name
FROM hr_operating_units hr
WHERE hr.organization_id = p_org_id;