The following lines contain the word 'select', 'insert', 'update' or 'delete':
select pbg.security_group_id
from per_business_groups pbg
, hr_all_organization_units oru
where oru.organization_id = p_organization_id
and pbg.business_group_id = oru.business_group_id;
select ORI.ORG_INFORMATION9
from HR_ORGANIZATION_INFORMATION ORI,
HR_ALL_ORGANIZATION_UNITS ORU
where ORI.ORGANIZATION_ID=ORU.BUSINESS_GROUP_ID
and ORU.ORGANIZATION_ID=p_organization_id
and ORI.ORG_INFORMATION_CONTEXT='Business Group Information'; -- changes for bug14506616
Procedure chk_non_updateable_args
(p_effective_date in date
,p_rec in hr_oru_shd.g_rec_type
) IS
--
l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
End chk_non_updateable_args;
select o.organization_id, o.business_group_id
from hr_all_organization_units o
where (o.name = p_name OR o.organization_id = p_organization_id);
select count(*)
into l_bg
from hr_organization_information i
where i.organization_id = crec.organization_id
and i.org_information1='HR_BG'
and i.org_information_context='CLASS'
and i.org_information2 ='Y';
SELECT 'Y'
FROM hr_soft_coding_keyflex
WHERE soft_coding_keyflex_id = p_soft_coding_keyflex_id;
SELECT 'Y'
FROM pay_cost_allocation_keyflex pcak,
per_business_groups_perf pbg
WHERE pcak.cost_allocation_keyflex_id = p_cost_allocation_keyflex_id
AND pbg.business_group_id = p_business_group_id
AND pbg.cost_allocation_structure = to_char(pcak.id_flex_num);
SELECT COUNT(*)
INTO l_count
FROM hr_organization_information
WHERE organization_id = p_organization_id
AND org_information_context = 'CLASS'
AND org_information1 = 'HR_ORG'
AND org_information2 = 'Y';
SELECT 'Y'
FROM hr_locations_all
WHERE location_id = p_location_id;
SELECT 'Y'
FROM hr_lookups
WHERE lookup_type = 'ORG_TYPE'
AND lookup_code = p_type
AND enabled_flag = 'Y'
AND p_effective_date BETWEEN nvl(start_date_active,p_effective_date)
AND nvl(end_date_active,p_effective_date);
SELECT 'Y'
FROM hr_lookups
WHERE lookup_type = 'INTL_EXTL'
AND lookup_code = p_internal_external_flag
AND enabled_flag = 'Y'
AND p_effective_date BETWEEN nvl(start_date_active,p_effective_date)
AND nvl(end_date_active,p_effective_date);
PROCEDURE chk_org_delete
( p_organization_id IN hr_all_organization_units.organization_id%TYPE)
IS
l_proc VARCHAR2(72) := g_package||'chk_cls_exists';
SELECT 'Y'
INTO l_exists
FROM sys.dual
WHERE EXISTS
(SELECT null
FROM hr_organization_information
WHERE organization_id = p_organization_id
AND org_information_context = 'CLASS'
AND org_information2 = 'Y'
);
END chk_org_delete;
Procedure insert_validate
(p_effective_date in date
,p_rec in hr_oru_shd.g_rec_type
,p_duplicate_org_warning out nocopy boolean
) is
--
l_proc varchar2(72) := g_package||'insert_validate';
End insert_validate;
Procedure update_validate
(p_effective_date in date
,p_rec in hr_oru_shd.g_rec_type
,p_duplicate_org_warning out nocopy boolean
) is
--
l_proc varchar2(72) := g_package||'update_validate';
chk_non_updateable_args
(p_effective_date => p_effective_date
,p_rec => p_rec
);
End update_validate;
Procedure delete_validate
(p_rec in hr_oru_shd.g_rec_type
) is
--
l_proc varchar2(72) := g_package||'delete_validate';
select business_group_id
into l_bg_id
from hr_all_organization_units
where organization_id = p_rec.organization_id;
chk_org_delete
(p_organization_id => p_rec.organization_id);
hr_job_pos.hr_jp_predelete(p_rec.organization_id,
l_bg_id);
End delete_validate;