@@ -31,7 +31,7 @@ create or replace package body ut_compound_data_helper is
3131 select
3232 ucd.item_data
3333 ,x.data_id data_id
34- ,{: item_no:} item_no
34+ ,position + x. item_no item_no
3535 {:columns:}
3636 from {:ut3_owner:}.ut_compound_data_tmp x,
3737 xmltable('/ROWSET/ROW' passing x.item_data columns
@@ -49,7 +49,7 @@ create or replace package body ut_compound_data_helper is
4949 select
5050 ucd.item_data
5151 ,x.data_id data_id
52- ,{: item_no:} item_no
52+ ,position + x. item_no item_no
5353 {:columns:}
5454 from {:ut3_owner:}.ut_compound_data_tmp x,
5555 xmltable('/ROWSET/ROW' passing x.item_data columns
@@ -64,7 +64,7 @@ create or replace package body ut_compound_data_helper is
6464 a.data_id act_data_id,
6565 e.item_data as exp_item_data,
6666 e.data_id exp_data_id,
67- {:item_no_select :} as item_no,
67+ {:item_no :} as item_no,
6868 nvl(e.dup_no,a.dup_no) dup_no
6969 from act a {:join_type:} exp e on ( {:join_condition:} )
7070 where {:where_condition:}]';
@@ -354,8 +354,8 @@ create or replace package body ut_compound_data_helper is
354354 begin
355355 return
356356 case
357- when not a_unordered then 'position + x .item_no '
358- else 'rownum '
357+ when a_unordered then 'row_number() over ( order by nvl(e .item_no,a.item_no)) '
358+ else 'nvl(e.item_no,a.item_no) '
359359 end;
360360 end;
361361
@@ -372,10 +372,9 @@ create or replace package body ut_compound_data_helper is
372372
373373 l_compare_sql := replace(l_compare_sql,'{:duplicate_number:}',l_partition_stmt);
374374 l_compare_sql := replace(l_compare_sql,'{:columns:}',l_select_stmt);
375- l_compare_sql := replace(l_compare_sql,'{:item_no:}',get_item_no(a_unordered));
376375 l_compare_sql := replace(l_compare_sql,'{:ut3_owner:}',l_ut_owner);
377376 l_compare_sql := replace(l_compare_sql,'{:xml_to_columns:}',l_xmltable_stmt);
378- l_compare_sql := replace(l_compare_sql,'{:item_no_select :}',case when a_unordered then 'rownum' else 'nvl(e.item_no,a.item_no)' end );
377+ l_compare_sql := replace(l_compare_sql,'{:item_no :}',get_item_no(a_unordered) );
379378 l_compare_sql := replace(l_compare_sql,'{:join_type:}',get_join_type(a_inclusion_type,a_is_negated));
380379 l_compare_sql := replace(l_compare_sql,'{:join_condition:}',l_join_on_stmt);
381380
@@ -634,7 +633,7 @@ create or replace package body ut_compound_data_helper is
634633 a_diff_tab(idx).item_no, a_diff_tab(idx).dup_no);
635634 exception
636635 when ut_utils.ex_failure_for_all then
637- raise_application_error(ut_utils.gc_failure_for_all ,'Failure to insert a diff tmp data.');
636+ raise_application_error(ut_utils.gc_dml_for_all ,'Failure to insert a diff tmp data.');
638637 end;
639638
640639 procedure set_rows_diff(a_rows_diff integer) is
0 commit comments