Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do you compare one table to another to determine differences?
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