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: Best way to compare records ?

Re: Best way to compare records ?

From: CrazyIvan <crazyivan_at_pandora.be>
Date: Mon, 22 Oct 2001 15:08:39 GMT
Message-ID: <XDWA7.18150$ic.1067@afrodite.telenet-ops.be>


The problem is not getting it to work, but finding the most efficient method. At the moment i am
fetching the new (master) records into a cursor. In the body of this cursor i locate the correposponding
record (if any), wich i compare field by field using the NVL-function to avoid having to compare a value with a null-value. I find that this procedure works fine, but runs very slow. Maybe it's the only way?

Thanx anyway..

"Ed Prochak" <edprochak_at_magicinterface.com> wrote in message news:3BD39C72.AF255E4F_at_magicinterface.com...
>
>
> CrazyIvan wrote:
> >
> > 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.
>
> I'd say the answer is: it depends!
>
>
> I don't believe there is an answer specific to ORACLE. This is really
> dependent on your application data. I say this from the experience of
> working thru these issues right now on my current assignment.
>
> 1. If you have one source that you know is correct, then is should be a
> simple procedure.
>
> 2. If your problem is like mine, identifying which of multiple systems
> have the right data, then you may be stuck with lots of manual data
> review.
>
> 3. If you problem is merely the issue of applying a delta, then it also
> should be easy.
>
> I know this doesn't really solve your problem, but remember, I'm stuck
> in situation #2!
Received on Mon Oct 22 2001 - 10:08:39 CDT

Original text of this message

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