View previous topic :: View next topic
|
Author |
Message |
ashokakash
New User
Joined: 15 Nov 2006 Posts: 21 Location: Chennai
|
|
|
|
Hi,
I have two tables. Both the table structures are exactly one and same. Now I need to compare the values of each column of each row against the other. Do we have any utility to do that using batch jobs.
If any other suggestion to accomplish this would be appreciated
Thanks in advance
Akash |
|
Back to top |
|
|
arivazhagan_k
New User
Joined: 05 Dec 2007 Posts: 57 Location: chennai
|
|
|
|
compare two tables difference
T1 EXCEPT T2
UNION ALL
T2 EXCEXT T1[/color]
EXCEPT ALL is better if your tables have no keys.
and don't forget the brackets otherwise you will be doing
(((T1 EXCEPT ALL T2) UNION ALL T2) EXCEPT ALL T1) !
with a(a) as (values (1), (1),(2))
, b(b) as (values(1),(2),(2))
(select * from a
except ALL
select * from b)
union all
(select * from b
except ALL
select * from a)
; |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You might simply unload both tables and then use SUPERC to compare. Part of this decision would be how large the volume of data. |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Why double post? |
|
Back to top |
|
|
ashokakash
New User
Joined: 15 Nov 2006 Posts: 21 Location: Chennai
|
|
|
|
@PeD: Sorry I did not get what I expected. So I wanted to make my question clear. Posting my question as a continuation in stead I posted it as a separate entry.
Ny way Thanks for all those who helped me. |
|
Back to top |
|
|
|