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: Checking for deleted rows

Re: Checking for deleted rows

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Tue, 14 Sep 1999 21:12:13 +0200
Message-ID: <937336396.21938.0.pluto.d4ee154e@news.demon.nl>


Create a database link from the local pc to the server and use delete from table x
where not exists
(select 'x' from table_at_db-link y
 where y.primary-key = x.primary-key)

Or setup true replication of course.

Hth,

--
Sybrand Bakker, Oracle DBA
Simon Place <simon_at_hotelscene.co.uk> wrote in message news:937317980.28778.0.nnrp-11.d4f09432_at_news.demon.co.uk...
> I have a workstation-based copy of an Oracle table and want to check
whether
> any rows in that have been deleted from the actual server-based Oracle
> table. From the local copy I can build a list of primary keys and using
this
> I want to construct a SQL statement (if possible) which returns only those
> primary keys in the list which no longer exist in the server table (one
row
> for each key).
>
> I do not want to read in the whole server table and then process the
> differences at the client side. I suppose that I could pass the key list
to
> a server function and then pass back the amended key list which would then
> be used for deleting rows from the client copy of the table, but I just
> wonder whether there is any way of doing this with a SQL statement that
> produces mutliple rows.
>
> Many thanks
> Simon
>
>
>
Received on Tue Sep 14 1999 - 14:12:13 CDT

Original text of this message

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