Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Compare data in two tables help Please ??

Re: Compare data in two tables help Please ??

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 4 Apr 2000 00:06:23 +0200
Message-ID: <954824011.3843.1.pluto.d4ee154e@news.demon.nl>


select *
from tab1
minus
select *
from tab2
/
will provide all tab1 records different from tab2 provided the column definitons are the same.
Reverse tab1 and tab2 and you know the other set. Identical records can be identified with INTERSECT. So, you don't need diff...

Hth,

Sybrand Bakker, Oracle DBA

Mujahid Hamid <mujahid_at_pharmco.demon.co.uk> wrote in message news:954798834.27509.0.nnrp-06.c2de4f17_at_news.demon.co.uk...
> Hi All,
>
> I want to compare data in two tables and find out updated and inserted
> record by comparing the two tables.
> (I do not want to use triggers)
> I can get the new record by using the primary keys, but updated rows are a
> problem, I want to be able to compare all the columns in one row in one
> table to the all columns of the other table.
>
> Can this be done using PL/SQL ?
>
> These table are also available in flat CSV file, can I use Unix diff on
> these and get the same result.
>
> Please please help me, I will very much appreciate you help if you have
done
> this and have scripts which may of use to me ..
>
> With Thanks
>
> Mujahid
>
>
>
Received on Mon Apr 03 2000 - 17:06:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US