The following lines contain the word 'select', 'insert', 'update' or 'delete':
select pbg.security_group_id
from per_business_groups pbg
, irc_offers iof
, per_all_vacancies vac
where iof.offer_id = p_offer_id
and vac.vacancy_id = iof.vacancy_id
and pbg.business_group_id = vac.business_group_id;
select pbg.legislation_code
from per_business_groups_perf pbg
, irc_offers iof
, per_all_vacancies vac
where iof.offer_id = p_offer_id
and iof.vacancy_id = vac.vacancy_id
and pbg.business_group_id = vac.business_group_id;
Procedure chk_non_updateable_args
(p_effective_date in date
,p_rec in irc_iof_shd.g_rec_type
) IS
--
l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
End chk_non_updateable_args;
select 1
from per_all_assignments_f
where assignment_id = p_applicant_assignment_id
and assignment_type = 'A'
and p_effective_date
between effective_start_date
and effective_end_date;
select 1
from per_all_assignments_f
where assignment_id = p_offer_assignment_id
and assignment_type = 'O';
select 1
from irc_offers
where offer_assignment_id = p_offer_assignment_id;
select paaf.vacancy_id
from per_all_assignments_f paaf
where paaf.assignment_id = p_applicant_assignment_id
and p_effective_date
between effective_start_date
and effective_end_date;
select budget_measurement_value
,budget_measurement_type
from per_all_vacancies
where vacancy_id = p_vacancy_id;
select ios1.offer_status
,ios1.change_reason
from irc_offer_status_history ios1
where ios1.offer_id = p_offer_id
and EXISTS
(SELECT 1
FROM irc_offer_status_history iosh1
WHERE iosh1.offer_id = ios1.offer_id
AND iosh1.status_change_date > ios1.status_change_date
)
AND ios1.offer_status_history_id =
(SELECT MAX(iosh2.offer_status_history_id)
FROM irc_offer_status_history iosh2
WHERE iosh2.offer_id = ios1.offer_id
AND iosh2.status_change_date = ios1.status_change_date
)
AND 1 =
(SELECT COUNT(*)
FROM irc_offer_status_history ios3
WHERE ios3.offer_id = ios1.offer_id
AND ios3.status_change_date > ios1.status_change_date
);
select offer_status
from irc_offers
where offer_id = p_offer_id;
select count(*)
from irc_offers iof
,per_all_vacancies pav
,irc_offer_status_history iosh
where pav.vacancy_id = p_vacancy_id
and iof.vacancy_id = pav.vacancy_id
and iosh.offer_id = iof.offer_id
and iof.offer_id <> p_offer_id
AND NOT EXISTS
(SELECT 1
FROM irc_offer_status_history iosh1
WHERE iosh1.offer_id = iosh.offer_id
AND iosh1.status_change_date > iosh.status_change_date
)
AND iosh.offer_status_history_id =
(SELECT MAX(iosh2.offer_status_history_id)
FROM irc_offer_status_history iosh2
WHERE iosh2.offer_id = iosh.offer_id
AND iosh2.status_change_date = iosh.status_change_date
)
and iof.latest_offer = 'Y'
and ( iof.offer_status = 'EXTENDED' or ( iof.offer_status = 'CLOSED' and iosh.change_reason = 'APL_ACCEPTED'));
select 1
from fnd_user
where user_id = p_respondent_id;
select adr.address_id
from per_addresses adr
,per_all_assignments_f asg
where asg.assignment_id = p_applicant_assignment_id
and adr.person_id = irc_utilities_pkg.get_recruitment_person_id(asg.person_id,trunc(sysdate))
and adr.address_type = 'REC'
and p_effective_date
between adr.date_from
and nvl(adr.date_to, trunc(sysdate));
select 1
from per_addresses
where address_id = p_address_id;
select 1
from xdo_templates_b
where template_id = p_template_id
and p_effective_date
between start_date
and nvl(end_date,p_effective_date);
select ita.template_id
from irc_template_associations ita
,per_all_assignments_f ppaf
,irc_offers iof
where ita.default_association = 'Y'
and iof.offer_id = p_offer_id
and iof.offer_assignment_id = ppaf.assignment_id
and ita.job_id = ppaf.job_id;
select ita.template_id
from irc_template_associations ita
,per_all_assignments_f ppaf
,irc_offers iof
where ita.default_association = 'Y'
and iof.offer_id = p_offer_id
and iof.offer_assignment_id = ppaf.assignment_id
and ita.position_id = ppaf.position_id;
select ita.template_id
from irc_template_associations ita
,per_all_assignments_f ppaf
,irc_offers iof
where ita.default_association = 'Y'
and iof.offer_id = p_offer_id
and iof.offer_assignment_id = ppaf.assignment_id
and ita.organization_id = ppaf.organization_id;
select nvl(max(offer_version),0) + 1
from irc_offers
where ( applicant_assignment_id = nvl(p_applicant_assignment_id,-1)
OR
applicant_assignment_id = nvl(irc_offers_api.g_src_apl_asg_id,-1)
OR
applicant_assignment_id in
(
select tgt_apl_asg_id from per_vac_linked_assignments
where src_apl_asg_id = irc_offers_api.g_src_apl_asg_id
)
);
select 1
from irc_offers
where latest_offer = 'Y'
and applicant_assignment_id = p_applicant_assignment_id
and offer_id <> p_offer_id;
select 1
from irc_offers
where latest_offer = 'Y'
and applicant_assignment_id = p_applicant_assignment_id;
select 1
from irc_offers
where offer_version = p_offer_version
and applicant_assignment_id = p_applicant_assignment_id;
procedure chk_offer_status_update
( p_current_offer_record in irc_iof_shd.g_rec_type
)IS
--
l_proc varchar2(72) := g_package||'chk_offer_status_update';
l_mutiple_fields_updated boolean;
select ios1.offer_status
from irc_offer_status_history ios1
where ios1.offer_id = p_current_offer_record.offer_id
and EXISTS
(SELECT 1
FROM irc_offer_status_history iosh1
WHERE iosh1.offer_id = ios1.offer_id
AND iosh1.status_change_date > ios1.status_change_date
)
AND ios1.offer_status_history_id =
(SELECT MAX(iosh2.offer_status_history_id)
FROM irc_offer_status_history iosh2
WHERE iosh2.offer_id = ios1.offer_id
AND iosh2.status_change_date = ios1.status_change_date
)
AND 1 =
(SELECT COUNT(*)
FROM irc_offer_status_history ios3
WHERE ios3.offer_id = ios1.offer_id
AND ios3.status_change_date > ios1.status_change_date
);
IRC_IOF_BUS.chk_multiple_fields_updated
( p_offer_id => p_current_offer_record.offer_id
,p_offer_status => p_current_offer_record.offer_status
,p_discretionary_job_title => p_current_offer_record.discretionary_job_title
,p_offer_extended_method => p_current_offer_record.offer_extended_method
,p_expiry_date => p_current_offer_record.expiry_date
,p_proposed_start_date => p_current_offer_record.proposed_start_date
,p_offer_letter_tracking_code => p_current_offer_record.offer_letter_tracking_code
,p_offer_postal_service => p_current_offer_record.offer_postal_service
,p_offer_shipping_date => p_current_offer_record.offer_shipping_date
,p_applicant_assignment_id => p_current_offer_record.applicant_assignment_id
,p_offer_assignment_id => p_current_offer_record.offer_assignment_id
,p_address_id => p_current_offer_record.address_id
,p_template_id => p_current_offer_record.template_id
,p_offer_letter_file_type => p_current_offer_record.offer_letter_file_type
,p_offer_letter_file_name => p_current_offer_record.offer_letter_file_name
,p_attribute_category => p_current_offer_record.attribute_category
,p_attribute1 => p_current_offer_record.attribute1
,p_attribute2 => p_current_offer_record.attribute2
,p_attribute3 => p_current_offer_record.attribute3
,p_attribute4 => p_current_offer_record.attribute4
,p_attribute5 => p_current_offer_record.attribute5
,p_attribute6 => p_current_offer_record.attribute6
,p_attribute7 => p_current_offer_record.attribute7
,p_attribute8 => p_current_offer_record.attribute8
,p_attribute9 => p_current_offer_record.attribute9
,p_attribute10 => p_current_offer_record.attribute10
,p_attribute11 => p_current_offer_record.attribute11
,p_attribute12 => p_current_offer_record.attribute12
,p_attribute13 => p_current_offer_record.attribute13
,p_attribute14 => p_current_offer_record.attribute14
,p_attribute15 => p_current_offer_record.attribute15
,p_attribute16 => p_current_offer_record.attribute16
,p_attribute17 => p_current_offer_record.attribute17
,p_attribute18 => p_current_offer_record.attribute18
,p_attribute19 => p_current_offer_record.attribute19
,p_attribute20 => p_current_offer_record.attribute20
,p_attribute21 => p_current_offer_record.attribute21
,p_attribute22 => p_current_offer_record.attribute22
,p_attribute23 => p_current_offer_record.attribute23
,p_attribute24 => p_current_offer_record.attribute24
,p_attribute25 => p_current_offer_record.attribute25
,p_attribute26 => p_current_offer_record.attribute26
,p_attribute27 => p_current_offer_record.attribute27
,p_attribute28 => p_current_offer_record.attribute28
,p_attribute29 => p_current_offer_record.attribute29
,p_attribute30 => p_current_offer_record.attribute30
,p_mutiple_fields_updated => l_mutiple_fields_updated
);
if ( l_mutiple_fields_updated = true )
then
--
hr_utility.set_location(l_proc,45);
end chk_offer_status_update;
Procedure chk_multiple_fields_updated
( p_offer_id in number
,p_offer_status in varchar2 default null
,p_discretionary_job_title in varchar2 default null
,p_offer_extended_method in varchar2 default null
,p_expiry_date in date default null
,p_proposed_start_date in date default null
,p_offer_letter_tracking_code in varchar2 default null
,p_offer_postal_service in varchar2 default null
,p_offer_shipping_date in date default null
,p_applicant_assignment_id in number default null
,p_offer_assignment_id in number default null
,p_address_id in number default null
,p_template_id in number default null
,p_offer_letter_file_type in varchar2 default null
,p_offer_letter_file_name in varchar2 default null
,p_attribute_category in varchar2 default null
,p_attribute1 in varchar2 default null
,p_attribute2 in varchar2 default null
,p_attribute3 in varchar2 default null
,p_attribute4 in varchar2 default null
,p_attribute5 in varchar2 default null
,p_attribute6 in varchar2 default null
,p_attribute7 in varchar2 default null
,p_attribute8 in varchar2 default null
,p_attribute9 in varchar2 default null
,p_attribute10 in varchar2 default null
,p_attribute11 in varchar2 default null
,p_attribute12 in varchar2 default null
,p_attribute13 in varchar2 default null
,p_attribute14 in varchar2 default null
,p_attribute15 in varchar2 default null
,p_attribute16 in varchar2 default null
,p_attribute17 in varchar2 default null
,p_attribute18 in varchar2 default null
,p_attribute19 in varchar2 default null
,p_attribute20 in varchar2 default null
,p_attribute21 in varchar2 default null
,p_attribute22 in varchar2 default null
,p_attribute23 in varchar2 default null
,p_attribute24 in varchar2 default null
,p_attribute25 in varchar2 default null
,p_attribute26 in varchar2 default null
,p_attribute27 in varchar2 default null
,p_attribute28 in varchar2 default null
,p_attribute29 in varchar2 default null
,p_attribute30 in varchar2 default null
,p_mutiple_fields_updated out nocopy boolean
) IS
--
l_proc varchar2(72) := g_package || 'chk_multiple_fields_updated';
l_update_count number(2) := 0;
select
offer_id
,offer_version
,latest_offer
,offer_status
,discretionary_job_title
,offer_extended_method
,respondent_id
,expiry_date
,proposed_start_date
,offer_letter_tracking_code
,offer_postal_service
,offer_shipping_date
,applicant_assignment_id
,offer_assignment_id
,address_id
,template_id
,offer_letter_file_type
,offer_letter_file_name
,attribute_category
,attribute1
,attribute2
,attribute3
,attribute4
,attribute5
,attribute6
,attribute7
,attribute8
,attribute9
,attribute10
,attribute11
,attribute12
,attribute13
,attribute14
,attribute15
,attribute16
,attribute17
,attribute18
,attribute19
,attribute20
,attribute21
,attribute22
,attribute23
,attribute24
,attribute25
,attribute26
,attribute27
,attribute28
,attribute29
,attribute30
,object_version_number
from irc_offers
where offer_id = p_offer_id;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
l_update_count := l_update_count + 1;
if l_update_count > 1
then
--
hr_utility.set_location(l_proc,520);
p_mutiple_fields_updated := true;
p_mutiple_fields_updated := false;
End chk_multiple_fields_updated;
select offer_letter
from irc_offers
where offer_id = p_offer_id;
Procedure insert_validate
(p_effective_date in date
,p_rec in out nocopy irc_iof_shd.g_rec_type
) is
--
l_proc varchar2(72) := g_package||'insert_validate';
End insert_validate;
Procedure update_validate
(p_effective_date in date
,p_rec in out nocopy irc_iof_shd.g_rec_type
) is
--
l_proc varchar2(72) := g_package||'update_validate';
chk_non_updateable_args
(p_effective_date => p_effective_date
,p_rec => p_rec
);
chk_offer_status_update
(p_current_offer_record => p_rec
);
End update_validate;
Procedure delete_validate
(p_rec in irc_iof_shd.g_rec_type
) is
--
l_proc varchar2(72) := g_package||'delete_validate';
End delete_validate;