1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
create table test.primaire ( a number, b varchar2(2));
alter table TEST.PRIMAIRE
add constraint PR_P primary key (A)
using index
insert into primaire values (1, 'b');
insert into primaire values (2, 'a');
create table test.secondaire( a number, b varchar2(2));
alter table TEST.SECONDAIRE
add constraint PR_S primary key (A)
using index
insert into secondaire values (4, 'd');
create table test.missing_rows_data ( a number, b varchar2(2));
create table test.missing_rows_location ( present varchar2(128), absent varchar2(128), r_id rowid);
BEGIN
DBMS_RECTIFIER_DIFF.DIFFERENCES (
sname1 => 'TEST',
oname1 => 'PRIMAIRE',
reference_site => '',
sname2 => 'TEST',
oname2 => 'SECONDAIRE',
comparison_site => '',
where_clause => '',
column_list => '',
missing_rows_sname => 'TEST',
missing_rows_oname1 => 'missing_rows_data',
missing_rows_oname2 => 'missing_rows_location',
missing_rows_site => '',
max_missing => 500,
commit_rows => '');
END;
SQL> select * from test.missing_rows_data;
A B
---------- --
1 b
2 a
4 d
SQL> select * from missing_rows_location
PRESENT ABSENT LOCATION
RH RH AACDB9AA/AAACuYAAD
RH RH AACDB9AA/AAACuYAAE
RH RH AACDB9AA/AAACuYAAF
BEGIN
DBMS_RECTIFIER_DIFF.RECTIFY (
sname1 => 'TEST',
oname1 => 'PRIMAIRE',
reference_site => null,
sname2 => 'TEST',
oname2 => 'SECONDAIRE',
comparison_site => null,
column_list => null,
missing_rows_sname => 'TEST',
missing_rows_oname1 => 'missing_rows_data',
missing_rows_oname2 => 'missing_rows_location',
missing_rows_site => null,
commit_rows => null);
END; |
Partager