Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: comparing 3 tables from 3 databases
"Shawn" <spedwards_at_x.qwest.net> wrote in
news:K_wSc.305$dm1.27514_at_news.uswest.net:
>> > > We have 3 databases. Each of these databases have a identical
>> > > table. Each table has anywhere from
>> > > 1400-1550 records. The data in these tables was supposed to be
>> > > identical. But they aren't.
>> > > So, I need to compare the table in each database to determine the
>> > > exact differences of the data.
>> > > Any suggestions on how to best complete this task would be
>> > > greatly appreciated!
>> > >
>> > > Thanks,
>> > > Shawn
>> > >
>> >
>> > SELECT * FROM TABLE_A
>> > MINUS
>> > SELECT * FROM TABLE_A_at_REMOTE1;
>>
>> I'd extend that to
>>
>> select * from
>> (SELECT * FROM TABLE_A
>> MINUS
>> SELECT * FROM TABLE_A_at_REMOTE1)
>> union
>> (SELECT * FROM TABLE_A_at_REMOTE1
>> MINUS
>> SELECT * FROM TABLE_A)
>>
>> etc
>>
>> and we are both assuming that the table *definitions* are the same
>> but the data is different.
>>
>> --
> > What if the databases aren't linked? Each database represents > separate/distinct financial activity and I think they keep them apart > for audit reasons? > > Thanks, > Shawn
All the data needs to be in ONE place to compare.
The logistics & business rules are NOT an Oracle problem.
You're On Your Own (YOYO)! Received on Wed Aug 11 2004 - 20:06:16 CDT