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

Home -> Community -> Usenet -> c.d.o.server -> Re: How do you compare one table to another to determine differences?

Re: How do you compare one table to another to determine differences?

From: Andrew Protasov <oracle_at_protasov.kiev.ua>
Date: Tue, 17 Nov 98 10:26:30 +0200
Message-ID: <AFsCJKsK42@protasov.kiev.ua>


Hi,

What about this approach?

select * from newcustomers
minus
select * from oldcustomers;

Andrew Protasov

> I have one table, a snapshot table of customers that i get nightly. the info
> is copied to a regular table that i can insert and delete from. the problem
> is to get the new customers and get rid of the dropped ones
> It is a complex snapshot so i don't have the ability to get just the updates.
> How can I, in sql, compare this current night's table to the previous night's
> one so that i can mark with are new custmore and insert them to master table
> and mark the dropped ones to delte them
>
> (customers in the current but not older are new customers and should be
> inserted, customers in old but not current are old customers and should be
> deleted)
>
>
Received on Tue Nov 17 1998 - 02:26:30 CST

Original text of this message

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