The following lines contain the word 'select', 'insert', 'update' or 'delete':
Select count(*)
Into l_count
From per_assign_proposal_answers papa
Where papa.proposal_question_name = p_proposal_question_name
and exists
(Select *
From wf_item_activity_statuses wf
Where wf.item_key = papa.assignment_id
And wf.item_type = 'HR_OFFER'
And wf.activity_status = 'ACTIVE'
);
select ppf.person_id
,ppf.first_name||' '||ppf.last_name
,ppf.applicant_number
from per_all_people_f ppf
,per_all_assignments_f paf
where paf.assignment_id = p_candidate_assignment_id
and l_effective_date
between paf.effective_start_date
and paf.effective_end_date
and ppf.person_id = paf.person_id
and l_effective_date
between ppf.effective_start_date
and ppf.effective_end_date;
select a.supervisor_id
from per_all_assignments_f a
where a.person_id = p_person_id
and a.primary_flag = 'Y'
and a.assignment_type in ('E','C')
and trunc(sysdate)
between a.effective_start_date and effective_end_date;
select ppf.person_id
from per_all_assignments_f paf
,per_all_people_f ppf
where paf.person_id = l_in_person_id
and paf.primary_flag = 'Y'
and l_effective_date
between paf.effective_start_date
and paf.effective_end_date
and ppf.person_id = paf.supervisor_id
and ppf.current_employee_flag = 'Y'
and l_effective_date
between ppf.effective_start_date
and ppf.effective_end_date;
select distinct papa.person_id, pj.name
from per_jobs_tl pj
,per_assignments pa
,per_assign_proposal_answers papa
where pj.job_id = pa.job_id
and pj.language=userenv('LANG')
and pa.primary_flag = 'Y'
and pa.person_id = papa.person_id
and papa.assignment_id = p_assignment_id;
select distinct first_name||' '||last_name
from per_people
where person_id = p_person_id;
select distinct pj.name
from per_jobs_vl pj
,per_assignments pa
where pj.job_id = pa.job_id
and pa.primary_flag = 'Y'
and pa.person_id = p_person_id;
select paf.person_id
from per_all_assignments_f paf
start with paf.person_id = p_person_id
and paf.primary_flag = 'Y'
and l_effective_date
between paf.effective_start_date
and paf.effective_end_date
connect by prior paf.supervisor_id = paf.person_id
and paf.primary_flag = 'Y'
and l_effective_date
between paf.effective_start_date
and paf.effective_end_date;
select asg.supervisor_id
from per_all_assignments_f asg
where asg.assignment_id = p_candidate_assignment_id;
l_update boolean;
l_update_override boolean;
l_update_change_insert boolean;
l_datetrack_update_mode varchar2(30);
select paf.effective_start_date
,paf.effective_end_date
,paf.object_version_number
from per_all_assignments_f paf -- 10/17/97 Changed
where paf.assignment_id = p_candidate_assignment_id
order by paf.effective_start_date;
,p_update => l_update
,p_update_override => l_update_override
,p_update_change_insert => l_update_change_insert);
if l_update then
-- as we can perform an UPDATE we must set the datetrack mode accordingly.
-- we can also assume that no future changes exist for this applicant
-- (otherwise we would not be able to perform an UPDATE)
l_datetrack_update_mode := 'UPDATE';
l_datetrack_update_mode := 'CORRECTION';
l_datetrack_update_mode := 'UPDATE_CHANGE_INSERT';
,p_datetrack_update_mode => l_datetrack_update_mode
,p_assignment_id => p_candidate_assignment_id
,p_object_version_number => l_object_version_number
,p_assignment_status_type_id => p_status_type_id
,p_effective_start_date => l_effective_start_date
,p_effective_end_date => l_effective_end_date);
l_datetrack_update_mode := 'CORRECTION';
procedure insert_attachment
(p_attachment_text in long default null
,p_entity_name in varchar2 default null
,p_pk1_value in varchar2 default null
,p_attached_document_id out nocopy
fnd_attached_documents.attached_document_id%TYPE
,p_document_id out nocopy
fnd_documents.document_id%TYPE
,p_media_id out nocopy
fnd_documents_tl.media_id%TYPE
,p_rowid out nocopy varchar2
,p_login_person_id in number) is -- 10/14/97 Changed
-- [CUSTOMIZE]
-- Call fnd_attached_documents_pkg.insert_row api to insert into fnd_documents
-- table. If customer uses third party software to store the resume, modify
-- the code here.
l_rowid varchar2(50) default null;
select nvl(max(seq_num),0) + 10
from fnd_attached_documents
where entity_name = p_entity_name
and pk1_value = p_pk1_value
and pk2_value is null
and pk3_value is null
and pk4_value is null
and pk5_value is null;
select category_id
from fnd_document_categories_tl
where language = csr_p_lang
and name = 'HR_RESUME'; -- updated for bug no:2533461
select userenv('LANG') into l_language from dual;
select fnd_attached_documents_s.nextval
into l_attached_document_id
from sys.dual;
fnd_attached_documents_pkg.insert_row
(x_rowid => l_rowid
,x_attached_document_id => l_attached_document_id
,x_document_id => l_document_id
,x_creation_date => trunc(sysdate)
,x_created_by => p_login_person_id --10/14/97Chg
,x_last_update_date => trunc(sysdate)
,x_last_updated_by => p_login_person_id --10/14/97Chg
,x_seq_num => l_seq_num
,x_entity_name => p_entity_name
,x_column1 => 'PERSON_ID'
,x_pk1_value => p_pk1_value
,x_pk2_value => null
,x_pk3_value => null
,x_pk4_value => null
,x_pk5_value => null
,x_automatically_added_flag => 'N'
,x_datatype_id => l_datatype_id
,x_category_id => l_category_id
,x_security_type => 4
,x_publish_flag =>'N'
,x_usage_type =>'O'
,x_language => l_language
,x_media_id => l_media_id
,x_doc_attribute_category => null
,x_doc_attribute1 => null
,x_doc_attribute2 => null
,x_doc_attribute3 => null
,x_doc_attribute4 => null
,x_doc_attribute5 => null
,x_doc_attribute6 => null
,x_doc_attribute7 => null
,x_doc_attribute8 => null
,x_doc_attribute9 => null
,x_doc_attribute10 => null
,x_doc_attribute11 => null
,x_doc_attribute12 => null
,x_doc_attribute13 => null
,x_doc_attribute14 => null
,x_doc_attribute15 => null);
insert into fnd_documents_long_text
(media_id
,long_text)
values
(l_media_id
,p_attachment_text);
end insert_attachment;
procedure update_attachment
(p_attachment_text in long default null
,p_entity_name in varchar2 default null
,p_pk1_value in varchar2 default null
,p_rowid in varchar2
,p_login_person_id in number) is -- 10/14/97 Changed
-- [CUSTOMIZE]
-- Call fnd_attached_documents_pkg.update_row api to update fnd_documents
-- table. If customer uses third party software to store the resume, modify
-- the code here.
l_rowid varchar2(50);
select *
from fnd_attached_documents
where rowid = p_rowid;
select *
from fnd_documents
where document_id = csr_p_document_id;
select *
from fnd_documents_tl
where document_id = csr_p_document_id
and language = csr_p_lang;
select userenv('LANG') into l_language from dual;
fnd_attached_documents_pkg.update_row
(x_rowid => p_rowid
,x_attached_document_id =>
l_attached_doc_pre_upd.attached_document_id
,x_document_id => l_doc_pre_upd.document_id
,x_last_update_date => trunc(sysdate)
,x_last_updated_by => p_login_person_id --10/14/97chg
,x_seq_num => l_attached_doc_pre_upd.seq_num
,x_entity_name => p_entity_name
,x_column1 => 'PERSON_ID'
,x_pk1_value => p_pk1_value
,x_pk2_value => l_attached_doc_pre_upd.pk2_value
,x_pk3_value => l_attached_doc_pre_upd.pk3_value
,x_pk4_value => l_attached_doc_pre_upd.pk4_value
,x_pk5_value => l_attached_doc_pre_upd.pk5_value
,x_automatically_added_flag =>
l_attached_doc_pre_upd.automatically_added_flag
,x_attribute_category =>
l_attached_doc_pre_upd.attribute_category
,x_attribute1 => l_attached_doc_pre_upd.attribute1
,x_attribute2 => l_attached_doc_pre_upd.attribute2
,x_attribute3 => l_attached_doc_pre_upd.attribute3
,x_attribute4 => l_attached_doc_pre_upd.attribute4
,x_attribute5 => l_attached_doc_pre_upd.attribute5
,x_attribute6 => l_attached_doc_pre_upd.attribute6
,x_attribute7 => l_attached_doc_pre_upd.attribute7
,x_attribute8 => l_attached_doc_pre_upd.attribute8
,x_attribute9 => l_attached_doc_pre_upd.attribute9
,x_attribute10 => l_attached_doc_pre_upd.attribute10
,x_attribute11 => l_attached_doc_pre_upd.attribute11
,x_attribute12 => l_attached_doc_pre_upd.attribute12
,x_attribute13 => l_attached_doc_pre_upd.attribute13
,x_attribute14 => l_attached_doc_pre_upd.attribute14
,x_attribute15 => l_attached_doc_pre_upd.attribute15
/* columns necessary for creating a document on the fly */
,x_datatype_id => l_doc_pre_upd.datatype_id
,x_category_id => l_doc_pre_upd.category_id
,x_security_type => l_doc_pre_upd.security_type
,x_security_id => l_doc_pre_upd.security_id
,x_publish_flag => l_doc_pre_upd.publish_flag
,x_image_type => l_doc_pre_upd.image_type
,x_storage_type => l_doc_pre_upd.storage_type
,x_usage_type => l_doc_pre_upd.usage_type
,x_start_date_active => trunc(sysdate)
,x_end_date_active => l_doc_pre_upd.end_date_active
,x_language => l_language
,x_description => l_doc_tl_pre_upd.description
,x_file_name => l_doc_tl_pre_upd.file_name
,x_media_id => l_doc_tl_pre_upd.media_id
,x_doc_attribute_category =>
l_doc_tl_pre_upd.doc_attribute_category
,x_doc_attribute1 => l_doc_tl_pre_upd.doc_attribute1
,x_doc_attribute2 => l_doc_tl_pre_upd.doc_attribute2
,x_doc_attribute3 => l_doc_tl_pre_upd.doc_attribute3
,x_doc_attribute4 => l_doc_tl_pre_upd.doc_attribute4
,x_doc_attribute5 => l_doc_tl_pre_upd.doc_attribute5
,x_doc_attribute6 => l_doc_tl_pre_upd.doc_attribute6
,x_doc_attribute7 => l_doc_tl_pre_upd.doc_attribute7
,x_doc_attribute8 => l_doc_tl_pre_upd.doc_attribute8
,x_doc_attribute9 => l_doc_tl_pre_upd.doc_attribute9
,x_doc_attribute10 => l_doc_tl_pre_upd.doc_attribute10
,x_doc_attribute11 => l_doc_tl_pre_upd.doc_attribute11
,x_doc_attribute12 => l_doc_tl_pre_upd.doc_attribute12
,x_doc_attribute13 => l_doc_tl_pre_upd.doc_attribute13
,x_doc_attribute14 => l_doc_tl_pre_upd.doc_attribute14
,x_doc_attribute15 => l_doc_tl_pre_upd.doc_attribute15);
update fnd_documents_long_text
set long_text = p_attachment_text
where media_id = l_doc_tl_pre_upd.media_id;
End update_attachment;
l_update_date date default null;
select category_id
from fnd_document_categories_tl
where language = csr_p_lang
and name = 'HR_RESUME'; -- updated for bug no:2533461
select fatd.rowid, fatd.attached_document_id, fatd.document_id, fatd.seq_num
,fd.last_update_date
from fnd_attached_documents fatd
,fnd_documents fd
where fd.category_id = csr_p_cat_id
and fatd.entity_name = p_entity_name
and fatd.pk1_value = p_pk1_value
and fatd.document_id = fd.document_id
order by fd.creation_date desc
,fd.last_update_date desc; -- retrieve the one updated the last
select media_id
from fnd_documents_tl
where document_id = csr_p_document_id;
select long_text
from fnd_documents_long_text
where media_id = csr_p_media_id;
select userenv('LANG') into l_language from dual;
l_document_id, l_seq_num, l_update_date;