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: Dupes

Re: Dupes

From: Peter Stålhammar <peter.stalhammar_at_senet.abb.se>
Date: 1997/04/25
Message-ID: <336065C7.2F22@senet.abb.se>#1/1

Richard Garrett wrote:
>
> Why dont you write a little plsql using a cursor to select all the
> duplicates. You can use the count attribute of the cursor to delete all the
> rows and even decide to leav the first one if required.
>
> regards
> Richard Garrett Parallax Solutions.
>
> Bruce Bristol wrote in article <335ADC4B.7415_at_ix.netcom.com>...
> > I have two tables, a base and an incremental with the same layout.
> >
> > They somehow now have duplicate rows.
> >
> > I want to find the dupes and ultimately, delete them from the
> > incremental table.Why not try this

Delete from inctable
where exists(select 'X' from basetable

              where basekey = inckey);
Regards

Peter

-- 
*****************************************
* Peter Stålhammar,Know It Mälardalen   *  
* Peter.Stalhammar_at_knowit.se            * 
* 0705-87 76 30 ,www.knowit.se          *
*****************************************
Received on Fri Apr 25 1997 - 00:00:00 CDT

Original text of this message

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