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 -> Multi Row DELETEs

Multi Row DELETEs

From: Programming <sysdev_at_mb.sympatico.ca>
Date: 1997/06/09
Message-ID: <339C1E2E.3550@mb.sympatico.ca>#1/1

Multi-row DELETEs

I am trying to do something conceptually very simple.

I have 2 tables. I want to delete the records in one table, that don't exist in the other table.

Initial queries are:

Select c.agt_ref
from agt3 c, agt b
where c.agt_ref = b.agt_ref (+)
and b.agt_ref is null

37 rows selected. Elapsed: 00:00:00.74

select c.agt_ref
from agt3 c
minus
select a.agt_ref
from agt a

37 rows selected. Elapsed: 00:00:00.77

You would figure that deleting these records would be very simple. Yet, nothing works.

delete from AGT
where AGT_REF IN
(select c.agt_ref

from agt3 c
minus
select a.agt_ref
from agt a )

0 rows deleted. Elapsed: 00:00:00.72

Delete from AGT
where AGT_REF IN
(select c.agt_ref

from agt3 c, agt b
where c.agt_ref = b.agt_ref (+)
and b.agt_ref is null )

0 rows deleted. Elapsed: 00:00:00.80

I DO have DELETE privileges on the AGT table.

Am I missing something? Any ideas?

Rodger Lepinsky
ADP Systems Partnership
Winnipeg, Manitoba, Canada Received on Mon Jun 09 1997 - 00:00:00 CDT

Original text of this message

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