@@ -28,46 +28,46 @@ create or replace package body ut_compound_data_helper is
2828 with exp as (
2929 select
3030 ucd.*,
31- {:duplicate_number:} dup_no
31+ {:duplicate_number:} "UT3$_Dup#No"
3232 from (
3333 select
34- ucd.item_data
35- ,x.data_id data_id
36- ,position + x.item_no item_no
34+ ucd."UT3$_Item#Data"
35+ ,x.data_id "UT3$_Data#Id"
36+ ,ucd."UT3$_Position#" + x.item_no "UT3$_Item#No"
3737 {:columns:}
3838 from ut_compound_data_tmp x,
3939 xmltable('/ROWSET/ROW' passing x.item_data columns
40- item_data xmltype path '*'
41- ,position for ordinality
40+ "UT3$_Item#Data" xmltype path '*'
41+ ,"UT3$_Position#" for ordinality
4242 {:xml_to_columns:} ) ucd
43- where data_id = :exp_guid
43+ where x. data_id = :exp_guid
4444 ) ucd
4545 )
4646 , act as (
4747 select
4848 ucd.*,
49- {:duplicate_number:} dup_no
49+ {:duplicate_number:} "UT3$_Dup#No"
5050 from (
5151 select
52- ucd.item_data
53- ,x.data_id data_id
54- ,position + x.item_no item_no
52+ ucd."UT3$_Item#Data"
53+ ,x.data_id "UT3$_Data#Id"
54+ ,ucd."UT3$_Position#" + x.item_no "UT3$_Item#No"
5555 {:columns:}
5656 from ut_compound_data_tmp x,
5757 xmltable('/ROWSET/ROW' passing x.item_data columns
58- item_data xmltype path '*'
59- ,position for ordinality
58+ "UT3$_Item#Data" xmltype path '*'
59+ ,"UT3$_Position#" for ordinality
6060 {:xml_to_columns:} ) ucd
61- where data_id = :act_guid
61+ where x. data_id = :act_guid
6262 ) ucd
6363 )
6464 select
65- a.item_data as act_item_data,
66- a.data_id act_data_id,
67- e.item_data as exp_item_data,
68- e.data_id exp_data_id,
65+ a."UT3$_Item#Data" as act_item_data,
66+ a."UT3$_Data#Id" act_data_id,
67+ e."UT3$_Item#Data" as exp_item_data,
68+ e."UT3$_Data#Id" exp_data_id,
6969 {:item_no:} as item_no,
70- nvl(e.dup_no ,a.dup_no ) dup_no
70+ nvl(e."UT3$_Dup#No" ,a."UT3$_Dup#No" ) dup_no
7171 from act a {:join_type:} exp e on ( {:join_condition:} )
7272 where {:where_condition:}]';
7373
@@ -306,16 +306,16 @@ create or replace package body ut_compound_data_helper is
306306 a_join_by_stmt := ut_utils.table_to_clob(l_join_by_list, ' and ');
307307 elsif a_unordered then
308308 -- If no key defined do the join on all columns
309- a_join_by_stmt := ' e.dup_no = a.dup_no and '||ut_utils.table_to_clob(l_equal_list, ' and ');
309+ a_join_by_stmt := ' e."UT3$_Dup#No" = a."UT3$_Dup#No" and '||ut_utils.table_to_clob(l_equal_list, ' and ');
310310 else
311311 -- Else join on rownumber
312- a_join_by_stmt := 'a.item_no = e.item_no ';
312+ a_join_by_stmt := 'a."UT3$_Item#No" = e."UT3$_Item#No" ';
313313 end if;
314314 a_not_equal_stmt := ut_utils.table_to_clob(l_not_equal_list, ' or ');
315315 else
316316 --Partition by piece when no data
317317 ut_utils.append_to_clob(a_partition_stmt,' 1 ');
318- a_join_by_stmt := 'a.item_no = e.item_no ';
318+ a_join_by_stmt := 'a."UT3$_Item#No" = e."UT3$_Item#No" ';
319319 end if;
320320 end;
321321
@@ -349,8 +349,8 @@ create or replace package body ut_compound_data_helper is
349349 begin
350350 return
351351 case
352- when a_unordered then 'row_number() over ( order by nvl(e.item_no ,a.item_no ))'
353- else 'nvl(e.item_no ,a.item_no ) '
352+ when a_unordered then 'row_number() over ( order by nvl(e."UT3$_Item#No" ,a."UT3$_Item#No" ))'
353+ else 'nvl(e."UT3$_Item#No" ,a."UT3$_Item#No" ) '
354354 end;
355355 end;
356356
@@ -387,9 +387,9 @@ create or replace package body ut_compound_data_helper is
387387 end if;
388388 --If its inclusion we expect a actual set to fully match and have no extra elements over expected
389389 if a_inclusion_type then
390- ut_utils.append_to_clob(l_where_stmt,case when a_is_negated then ' 1 = 1 ' else ' ( a.data_id is null ) ' end);
390+ ut_utils.append_to_clob(l_where_stmt,case when a_is_negated then ' 1 = 1 ' else ' ( a."UT3$_Data#Id" is null ) ' end);
391391 else
392- ut_utils.append_to_clob(l_where_stmt,' (a.data_id is null or e.data_id is null) ');
392+ ut_utils.append_to_clob(l_where_stmt,' (a."UT3$_Data#Id" is null or e."UT3$_Data#Id" is null) ');
393393 end if;
394394
395395 l_compare_sql := replace(l_compare_sql,'{:where_condition:}',l_where_stmt);
@@ -561,6 +561,8 @@ create or replace package body ut_compound_data_helper is
561561 procedure cleanup_diff is
562562 begin
563563 g_diff_count := 0;
564+ delete from ut_compound_data_diff_tmp;
565+ delete from ut_json_data_diff_tmp;
564566 end;
565567
566568 function get_rows_diff_count return integer is
0 commit comments