The following lines contain the word 'select', 'insert', 'update' or 'delete':
select file_detail_id
into file_id
from pay_file_details
where source_id=p_source_id
and source_type=p_source_type
and internal_file_name=p_int_file_name
and sequence=p_sequence;
select blob_file_fragment
into g_file_list(file_id).file_locator
from pay_file_details
where file_detail_id=file_id
for update of blob_file_fragment;
select pay_file_details_s.nextval
into file_id
from dual;
insert into pay_file_details
(file_detail_id,
source_id,
source_type,
file_location,
file_type,
internal_file_name,
blob_file_fragment,
sequence
)
values
(file_id,
p_source_id,
p_source_type,
p_file_location,
p_file_type,
p_int_file_name,
empty_blob(),
p_sequence
);
select blob_file_fragment
into g_file_list(file_id).file_locator
from pay_file_details
where file_detail_id = file_id
for update of blob_file_fragment;
delete_mul_root_tag -
DESCRIPTION This procedure gets called from read_from_clob
and will delete root tag from the text except from the first fragment
of first file and last fragment of last file.
NOTES
Bug : 6795217
NAME
delete_mul_root_tag -
DESCRIPTION : Modified procedure to remove the end tags in the cases where
end tags is broken in 2 fragments,
Example End tag is ''
Case 1: is coming in last fragment
Case 2: < is coming in second last fragment
and remaining /ARCHIVE_CHEQUE_WRITER> is coming in last fragment
Fix : a.) Identify the Second last segment by searching for '' or ''
in the last 32 or 26 character (Worse case scenario "' or '' .
c.) Identify the last fragment , if the length of the fragment is less then the Bottom End Root Tag.
d.) In the last fragment if the first character is "/" remove that .
e.) Replace the last '>' by 'Z/>' making it a dummy tag .
NOTES
*/
procedure delete_mul_root_tag(p_text in out nocopy varchar2)
is
l_top_root_tag varchar2(30);
hr_utility.trace('Entering delete_mul_root_tag ');
select count(*)
into g_chld_act
from pay_temp_object_actions
where payroll_action_id = g_payroll_id
and action_status = 'C';
select count(*)
into g_chld_act
from pay_assignment_actions
where payroll_action_id = g_payroll_id
and action_status IN ('C', 'S');
hr_utility.trace('Leaving delete_mul_root_tag ');
end delete_mul_root_tag;
select file_fragment
into g_tmp_clob
from pay_file_details
where file_detail_id = p_file_id;
select blob_file_fragment
into g_tmp_blob
from pay_file_details
where file_detail_id = p_file_id;
/* Bug 6729909 Calling delete_mul_root_tag(p_text) to remove the top Level tag for merging of XML */
delete_mul_root_tag(p_text);
Close teh specified clob and delete the row from the plsql
table.
NOTES
*/
procedure close_file
(p_file_id in number)
is
prvptr number;
g_file_list.delete(p_file_id);
select file_fragment
into l_clob
from pay_file_details
where file_detail_id = p_file_id;
select file_fragment
into l_clob
from pay_file_details
where file_detail_id = p_file_id;
select blob_file_fragment
into l_blob
from pay_file_details
where file_detail_id = p_file_id;