Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Oracle / Oracle Server / January 2006

Tip: Looking for answers? Try searching our database.

How to Compare Two Records?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RK - 27 Jan 2006 14:03 GMT
Please help.

How do I compare two records in SQL*Plus by each field pair?

-- I have two tables with the same structure, but the records in the
two tables may be the same and may be different. I can use minus to
select the different records between the two tables, but how do I do to
pick out which field of the different record(s) that make the
difference? One table may have dozens of fields, and the differences
may be to the thousands of records, and all fields could be different.

Thanks.
Ed Prochak - 27 Jan 2006 18:11 GMT
> Please help.
>
[quoted text clipped - 8 lines]
>
> Thanks.

Looking for just a SQL solution??
there isn't an easy one. Would doing a minus on the PK and each field
work?
(ie a separate MINUS query for every non PK field)

If there are a lot of fields, use the data dictionaly to create the
queries.

A solution outside SQL might be easier. PERL springs to mind as a
language for this. Or maybe LISP might be better? (I don't know LISP).

 HTH,
  ed
RK - 27 Jan 2006 20:18 GMT
> > Please help.
> >
[quoted text clipped - 21 lines]
>
>  ...

By Perl/LISP, you meant to dump the table contents into files, and
compres the two files?

That is what I am doing right now. However just wish to learn if there
is a way with Oracle tools / applications themselves.

Thanks.
DA Morgan - 27 Jan 2006 22:18 GMT
>>>Please help.
>>>
[quoted text clipped - 29 lines]
>
> Thanks.

What do you need that DBMS_RECTIFIER_DIFF won't do?

Morgan's Library at www.psoug.org
Scroll down to DBMS_RECTIFIER_DIFF and check the docs at tahiti.oracle.com.
Signature

Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)

Ed Prochak - 31 Jan 2006 18:07 GMT
> > > Please help.
> > >
[quoted text clipped - 24 lines]
> By Perl/LISP, you meant to dump the table contents into files, and
> compres the two files?

yes.

> That is what I am doing right now. However just wish to learn if there
> is a way with Oracle tools / applications themselves.
>
> Thanks.

Thank Daniel, he answered you better than I did.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.