Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: need help tuning a very large delete
"Ryan Gaffuri" <rgaffuri_at_cox.net> wrote in message
news:1efdad5b.0309191144.f1d45f2_at_posting.google.com...
--snip--
> create table as new_Table
> select cols
> from master_table m, stage_table s
> where s.pk (+) = m.pk
> and s.delete = 'Y'
> and s.pk is null;
>
> that doesnt give me the correct results. any idea on how to write
> this? not every record in stage is flagged for delete?
Try this:
create table as new_Table
select cols
from master_table m,
(select pk from stage_table where delete = 'Y') s
where s.pk (+) = m.pk
and s.pk is null;
Anurag Received on Fri Sep 19 2003 - 18:07:02 CDT