The following lines contain the word 'select', 'insert', 'update' or 'delete':
select pbg.legislation_code
from per_business_groups pbg
where pbg.business_group_id = p_business_group_id;
select cnu.contribution_usage_id
from pay_fr_contribution_usages cnu
where cnu.group_code <> p_group_code
and cnu.process_type = p_process_type
and cnu.element_name = p_element_name
and cnu.contribution_usage_type = p_contribution_usage_type
and ( (p_business_group_id is null)
or(p_business_group_id is not null
and ( (cnu.business_group_id = p_business_group_id )
or(cnu.business_group_id is null)
)
)
);
select cnu.contribution_usage_id
from pay_fr_contribution_usages cnu
where cnu.group_code = p_group_code
and cnu.process_type = p_process_type
and cnu.element_name = p_element_name
and cnu.contribution_usage_type = p_contribution_usage_type
and (nvl(p_contribution_usage_id, -1) <> cnu.contribution_usage_id )
and ( (p_business_group_id is null)
or(p_business_group_id is not null
and ( (cnu.business_group_id = p_business_group_id )
or(cnu.business_group_id is null)
)
)
)
and ( ((nvl(p_date_to, hr_api.g_eot) <= nvl(cnu.date_to, hr_api.g_eot)
and nvl(p_date_to, hr_api.g_eot) >= cnu.date_from))
OR
( (p_date_from >= cnu.date_from)
and p_date_from <= nvl(cnu.date_to, hr_api.g_eot))
OR
( (p_date_from <= cnu.date_from)
and nvl(p_date_to, hr_api.g_eot) >= nvl(cnu.date_to, hr_api.g_eot))
);
select cnu.contribution_usage_id, cnu.object_version_number
from pay_fr_contribution_usages cnu
where cnu.group_code = p_group_code
and cnu.process_type = p_process_type
and cnu.element_name = p_element_name
and cnu.date_from = l_new_date_from
and cnu.contribution_usage_type = p_contribution_usage_type
and cnu.business_group_id is null;
pay_cnu_api.update_contribution_usage(
p_validate => FALSE
,p_effective_date => l_new_date_from
,p_date_to => l_new_date_to
,p_retro_contribution_code => p_retro_contribution_code
,p_object_version_number => l_existing_ovn_id
,p_contribution_usage_id => l_existing_cu_id
,p_contribution_code => p_contribution_code
,p_contribution_type => p_contribution_type
,p_code_rate_id => p_code_rate_id
);
select null
from pay_fr_contribution_usages cnu
where cnu.contribution_code = p_contribution_code
and cnu.rate_type = p_rate_type
and cnu.code_rate_id <> p_code_rate_id
and nvl(cnu.business_group_id,0) = nvl(p_business_group_id,0)
UNION
select null
from pay_fr_contribution_usages cnu
where cnu.code_rate_id = p_code_rate_id
and nvl(cnu.business_group_id,0) = nvl(p_business_group_id,0)
and cnu.contribution_code = p_contribution_code
and cnu.rate_type <> p_rate_type;
select code_rate_id
from pay_fr_contribution_usages cnu
where cnu.contribution_code = p_contribution_code
and cnu.rate_type = p_rate_type
and cnu.business_group_id = p_business_group_id;
select nvl(max(code_rate_id),29) +1
from pay_fr_contribution_usages cnu
where cnu.contribution_code = p_contribution_code
and cnu.business_group_id = p_business_group_id;