Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Best way to compare records ?
We had to do much the same thing, we needed a tool that found the
differences only from two identical tables.
I don't know if this helps, but for us it worked and was pretty quick.
create table Sames as
Select (column list)
from table_1
union
select (column_list)
from table_2;
then
select 'OLD' , *
from table_1
where not exists ( select 1
from sames where sames.key = table_1.key )union
from sames where sames.key = table_2.key )
We actually used materialized views and refreshed the view everytime we need to do a check,
Happy
"CrazyIvan" <wilfried.vanbaelen_at_pandora.be> wrote in message
news:a6vA7.12290$ic.762_at_afrodite.telenet-ops.be...
> What would be the best way to compare records field by field in PL/SQL?
> I have to update a table with several thousand records, some new, some the
> same, but some altered.
> Every record has to be compared field by field (not all fields, but most
of
> them) to detect changes.
>
> Thanx ia.
>
>
>
Received on Sat Oct 27 2001 - 04:49:05 CDT
![]() |
![]() |