The following lines contain the word 'select', 'insert', 'update' or 'delete':
select system_document_type from hr_document_types
where document_type_id = p_document_type_id; */
select 'X' from hr_document_extra_info
where document_type_id = P_DOCUMENT_TYPE_ID
and document_number = P_DOCUMENT_NUMBER
and ( DOCUMENT_EXTRA_INFO_ID <> P_DOCUMENT_EXTRA_INFO_ID or P_DOCUMENT_EXTRA_INFO_ID is null)
and sysdate between date_from and date_to;
select 1 into l_doc_exist from dual where p_document_type_id in
(select document_type_id from hr_document_types where category_code in ('RO_ID_INFO','RO_WORK_AUTH','RO_FISCAL_CERT'));
select ((add_months(trunc(P_DATE_FROM,'Y'),12)-1) + 60) into l_expiry_date from dual;
select 'x' from hr_document_extra_info
where person_id = p_person_id
and document_type_id = p_document_type_id
and (date_from between p_date_from and p_date_to or
date_to between p_date_from and p_date_to or
p_date_from between date_from and date_to);
PROCEDURE UPDATE_RO_DEI_INFO(P_DOCUMENT_EXTRA_INFO_ID NUMBER,
P_DOCUMENT_TYPE_ID NUMBER,
P_DOCUMENT_NUMBER VARCHAR2,
P_PERSON_ID NUMBER,
P_DATE_FROM DATE,
P_DATE_TO DATE,
P_ISSUED_DATE DATE) IS
cursor csr_doc_exists is
select null from hr_document_extra_info
where person_id = p_person_id
and document_type_id = p_document_type_id
and (date_from between p_date_from and p_date_to or
date_to between p_date_from and p_date_to or
p_date_from between date_from and date_to)
and document_extra_info_id <> p_document_extra_info_id;
l_proc:= g_package||'UPDATE_RO_DEI_INFO';
END UPDATE_RO_DEI_INFO;