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: SQL select and Oracle software

Re: SQL select and Oracle software

From: Pavel Polcar <pavel.polcar_at_berit.cz>
Date: 1998/01/20
Message-ID: <01bd2574$13824360$504331c3@polcar_nt4002>#1/1

My excuses to everybody who tried in vain my "solution". I forgot to put the min function in the inner select statement. The correct form is: delete from table t1
where rowid > (select min(rowid) from table t2 where t2.column=t1.column);

Pavel

Pavel Polcar <pavel.polcar_at_berit.cz> wrote in article <01bd24d2$744baad0$504331c3_at_polcar_nt4002>...
> Another solution which enables you to directly delete the duplicates:
>
> delete from table t1
> where rowid > (select rowid from table t2 where t2.column=t1.column);
>
> Hope this helps,
>
> Pavel
>
> Dave Angalich <dangalich_at_nttc.edu> wrote in article
> <34BFD6E0.AA3E7955_at_nttc.edu>...
> > We have recently combined 10+ different client databases into 1 large
> > database. This along with CSR entry has led to duplicate/erroneous
> > records. What I need to do is find a good way/tool to list and remove
> > the possible duplicates and update the necessary key/foreign key
> > ingo.(ex. List all people with the same last and first names and city
> > and pick which ones are dups. The picking can be manual.)
> >
> > Does anybody know of such a tool?? If not can you think of an
 efficient
> > way in SQL to list these dups?
> >
> > Thanks in advance,
> > Dave Angalich
> >
> >
>
Received on Tue Jan 20 1998 - 00:00:00 CST

Original text of this message

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