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: How to Compare Two Records?

Re: How to Compare Two Records?

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 27 Jan 2006 14:18:41 -0800
Message-ID: <1138400317.659338@jetspin.drizzle.com>


RK wrote:

> Ed Prochak wrote:
> 

>>RK wrote:
>>
>>>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.
>>
>>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).
>>
>> ...
> 
> 
> 
> 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.

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.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Fri Jan 27 2006 - 16:18:41 CST

Original text of this message

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