The following lines contain the word 'select', 'insert', 'update' or 'delete':
dummy1 VARCHAR2(4); -- into arg for main SELECT
select 'X'
from pa_implementations_all pai
where ( (p_org_structure_id = pai.organization_structure_id)
OR (p_org_structure_id = pai.proj_org_structure_id)
OR (p_org_structure_id = pai.exp_org_structure_id)
);
SELECT 'X'
INTO dummy1
FROM hr_organization_information
WHERE organization_id = pa_utils.business_group_id
AND org_information_context = 'Project Burdening Hierarchy'
AND to_number(org_information1) = p_org_structure_id;
/* Replacing the above SELECT with the below SELECT statement. */
SELECT 'X'
INTO dummy1
FROM sys.dual
WHERE exists (
SELECT 'X'
FROM pa_ind_rate_sch_revisions ind
WHERE ind.organization_structure_id = p_org_structure_id
);
dummy1 VARCHAR2(4); -- into arg for main SELECT
select 'X'
from pa_implementations_all pai
where ( (p_org_structure_version_id = pai.org_structure_version_id)
OR (p_org_structure_version_id = pai.proj_org_structure_version_id)
OR (p_org_structure_version_id = pai.exp_org_structure_version_id)
);
SELECT 'X'
INTO dummy1
FROM hr_organization_information
WHERE organization_id = pa_utils.business_group_id
AND org_information_context = 'Project Burdening Hierarchy'
AND to_number(org_information2) = p_org_structure_version_id;
/* Replacing the above SELECT with the below SELECT statement. */
SELECT 'X'
INTO dummy1
FROM sys.dual
WHERE exists (
SELECT 'X'
FROM pa_ind_rate_sch_revisions ind
WHERE ind.org_structure_version_id = p_org_structure_version_id
);
dummy1 VARCHAR2(4); -- into arg for main SELECT
SELECT 'X'
FROM pa_implementations_all pai,
per_org_structure_elements ose
WHERE p_org_structure_element_id = ose.org_structure_element_id /*Start-Added for bug:8285339*/
AND ((pai.org_structure_version_id = ose.org_structure_version_id
AND pai.start_organization_id = ose.organization_id_child)
OR (pai.proj_org_structure_version_id = ose.org_structure_version_id
AND pai.proj_start_org_id = ose.organization_id_child)
OR ( pai.exp_org_structure_version_id = ose.org_structure_version_id
AND pai.exp_start_org_id = ose.organization_id_child)) /*End-Added for bug:8285339*/
UNION /* Added for bug 5405854 - Burdening start org */
SELECT 'X'
FROM pa_ind_rate_sch_revisions ind,
per_org_structure_elements ose
WHERE ose.org_structure_element_id = p_org_structure_element_id
AND ind.org_structure_version_id = ose.org_structure_version_id
AND ind.start_organization_id = ose.organization_id_child
) ;
hr_utility.set_message (275,'PA_ORG_CANT_DELETE_STARTORG'); /* Message_name changed for bug fix 1713199 */
SELECT 'X'
INTO dummy1
FROM sys.dual
WHERE p_org_structure_element_id IN (
SELECT org_structure_element_id
FROM hr_organization_information info,
per_org_structure_elements ose
WHERE info.organization_id = pa_utils.business_group_id
AND ose.business_group_id = pa_utils.business_group_id
AND info.org_information_context = 'Project Burdening Hierarchy'
AND to_number(info.org_information2) = ose.org_structure_version_id
);
/* Replacing the above SELECT with the below SELECT statement. */
/* Check if the organization being deleted is used in Burdening */
-- hr_utility.trace('before check');
SELECT 'X'
INTO dummy1
FROM sys.dual
WHERE exists (
SELECT ics.organization_id
FROM pa_ind_compiled_sets ics,/*10327103 changed the table used from "pa_ind_cost_multipliers" to pa_ind_compiled_sets*/
pa_ind_rate_sch_revisions irr, --Bug 6074710
per_org_structure_elements ose
WHERE ose.org_structure_element_id = p_org_structure_element_id
/* Added below 2 conditions for bug 6074710*/
AND ose.org_structure_version_id = irr.org_structure_version_id
AND ics.ind_rate_sch_revision_id = irr.ind_rate_sch_revision_id
AND ose.organization_id_child = ics.organization_id); /*10327103*/
dummy1 VARCHAR2(4); -- into arg for main SELECT
select 'X'
from pa_all_organizations
where organization_id = p_org_id;
select 'X'
from pa_non_labor_resource_orgs
where organization_id = p_org_id;
select 'X'
from pa_std_bill_rate_schedules
where organization_id = p_org_id;