The following lines contain the word 'select', 'insert', 'update' or 'delete':
select '1'
from dual
where exists (select 'Y'
from pa_cc_tp_schedule_lines sl
where sl.labor_tp_rule_id=p_rule_id
or sl.nl_tp_rule_id=p_rule_id);
select '1' from dual
where exists (select 'Y'
from hr_operating_units o
where o.business_group_id=decode(G_global_access,'Y',business_group_id,G_business_group_id)
and o.organization_id=p_organization_id);
select '1' from dual
where exists (select 'Y'
from hr_legal_entities o
where o.business_group_id=decode(G_global_access,'Y',business_group_id,G_business_group_id)
and o.organization_id=p_organization_id);
select '1' from dual
where exists (select 'Y'
from hr_organization_units o1,
hr_organization_information o2
where o1.organization_id=o2.organization_id
and o1.organization_id=p_organization_id
and o2.org_information_context||'' ='CLASS'
and o2.org_information1='HR_BG');
procedure pre_insert_schedule_lines(p_tp_schedule_id IN number,
p_prvdr_organization_id IN number,
p_recvr_organization_id in number)
is
v_prvdr_org_level varchar2(4);
delete from pa_cc_tp_schedule_line_lkp
where prvdr_organization_id=p_prvdr_organization_id
and recvr_organization_id=p_recvr_organization_id
and tp_schedule_id=p_tp_schedule_id;
delete from pa_cc_tp_schedule_line_lkp
where prvdr_organization_id=p_prvdr_organization_id
and recvr_org_id=p_recvr_organization_id
and tp_schedule_id=p_tp_schedule_id;
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_organization_id=p_prvdr_organization_id
and recvr_org_id in
( select organization_id
from hr_operating_units h
where h.legal_entity_id=to_char(p_recvr_organization_id));
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_organization_id=p_prvdr_organization_id
and recvr_org_id in
(select organization_id
from hr_operating_units h
where h.business_group_id =p_recvr_organization_id);*/
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and PRVDR_ORGANIZATION_ID =p_prvdr_organization_id;
delete from pa_cc_tp_schedule_line_lkp
where prvdr_org_id=p_prvdr_organization_id
and recvr_org_id=p_recvr_organization_id
and tp_schedule_id=p_tp_schedule_id;
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id=p_prvdr_organization_id
and recvr_org_id in
( select organization_id
from hr_operating_units h
where h.legal_entity_id=to_char(p_recvr_organization_id));
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and PRVDR_ORG_ID=p_prvdr_organization_id
and recvr_org_id in
(select organization_id
from hr_operating_units h
where h.business_group_id =p_recvr_organization_id);
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and PRVDR_ORG_ID=p_prvdr_organization_id;
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.legal_entity_id=to_char(p_prvdr_organization_id))
and recvr_org_id in
(select organization_id
from hr_operating_units h
where h.legal_entity_id=to_char(p_recvr_organization_id));
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.legal_entity_id=to_char(p_prvdr_organization_id))
and recvr_org_id in
(select organization_id from hr_operating_units h
where h.business_group_id=p_recvr_organization_id);
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.legal_entity_id =to_char(p_prvdr_organization_id));
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.business_group_id =p_prvdr_organization_id)
and recvr_org_id in
(select organization_id
from hr_operating_units h
where h.business_group_id =p_recvr_organization_id);
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.business_group_id =p_prvdr_organization_id);
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.business_group_id =p_prvdr_organization_id)
and recvr_org_id in
(select organization_id
from hr_operating_units h
where h.legal_entity_id= to_char(p_prvdr_organization_id));
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.business_group_id =p_prvdr_organization_id)
and recvr_org_id =p_recvr_organization_id;
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.business_group_id =p_prvdr_organization_id)
and recvr_organization_id =p_recvr_organization_id;
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.legal_entity_id=to_char(p_prvdr_organization_id))
and recvr_org_id = p_recvr_organization_id ;
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id in
(select organization_id
from hr_operating_units h
where h.legal_entity_id=to_char(p_prvdr_organization_id))
and recvr_organization_id = p_recvr_organization_id ;
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and prvdr_org_id = p_prvdr_organization_id
and recvr_organization_id = p_recvr_organization_id ; End of 4654754 */
end pre_insert_schedule_lines;
procedure pre_delete_schedule_lines(p_tp_schedule_id in number,
p_tp_schedule_line_id in number)
is
begin
delete from pa_cc_tp_schedule_line_lkp
where tp_schedule_id=p_tp_schedule_id
and tp_schedule_line_id=p_tp_schedule_line_id;
end pre_delete_schedule_lines;
procedure check_delete_tp_schedule_ok(p_tp_schedule_id in number,
x_error_code in out NOCOPY number,/*File.sql.39*/
x_error_stage in out NOCOPY varchar2,/*File.sql.39*/
x_error_stack in out NOCOPY varchar2)/*File.sql.39*/
IS
old_stack varchar2(630);
x_error_stack := x_error_stack || '->check_delete_tp_schedule_ok';
end check_delete_tp_schedule_ok;
procedure check_del_update_rule_ok(p_tp_rule_id in number,
x_error_code in out NOCOPY number,/*File.sql.39*/
x_error_stage in out NOCOPY varchar2,/*File.sql.39*/
x_error_stack in out NOCOPY varchar2/*File.sql.39*/)
IS
old_stack varchar2(630);
x_error_stack := x_error_stack || '->check_del_update_rule_ok';
x_error_stage := 'PA_CC_TP_NO_DELETE_RULE';
end check_del_update_rule_ok;
select '1' from dual
where exists (select 'Y'
from hr_organization_units o1,
hr_organization_information o2
where o1.organization_id=o2.organization_id
and o1.organization_id=p_organization_id
and o2.org_information_context||''='CLASS'
and o2.org_information1='HR_BG');
select '1' from dual
where exists (select 'Y'
from hr_operating_units
where organization_id=p_organization_id
and business_group_id=decode(G_global_access,'Y',business_group_id,G_business_group_id));
select '1' from dual
where exists (select 'Y'
from hr_legal_entities
where organization_id=p_organization_id
and business_group_id=decode(G_global_access,'Y',business_group_id,G_business_group_id));