Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: urgent
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C03943.AA8E6E50
Content-Type: text/plain
thanx veera it worked!
Swapna
Swapna_P_at_satyam.com
Extn : 5603/5648
> ---------- > From: Veera Prasad[SMTP:vprasad_at_olf.com] > Reply To: ORACLE-L_at_fatcity.com > Sent: Thursday, October 19, 2000 2:50 AM > To: Multiple recipients of list ORACLE-L > Subject: Re: urgent > > Couple of methods to eliminate duplicate values , here I go with > First Method: > delete <table_name> a where rowid > (select min(rowid) from <table_name> b > > where a.col_name = b.col_name; > > Second Method: > delete <table_name> a where exists (select 'Dupes' from <table_name> b > where a.col_name = b.col_name and b.rowid > a.rowid); > > Veera > Swapna_P wrote: > > > > how to delete the duplicate records from a table............ > except for one field all the rest of the fields are the same,so want to > eliminate one record > > TIA > swapna > >
------_=_NextPart_001_01C03943.AA8E6E50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: urgent</TITLE>
</HEAD>
<BODY>
<P><FONT COLOR=3D"#800080" FACE=3D"Arial">thanx veera it worked!</FONT>
<BR><FONT COLOR=3D"#800080" SIZE=3D2 FACE=3D"Comic Sans =
MS">Swapna</FONT>
<BR><FONT COLOR=3D"#800080" SIZE=3D2 FACE=3D"Comic Sans =
MS">Swapna_P_at_satyam.com </FONT>
<P><FONT SIZE=3D1 FACE=3D"MS Sans Serif">----------</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">From:</FONT></B> =
<FONT SIZE=3D1 FACE=3D"MS Sans Serif">Veera =
Prasad[SMTP:vprasad_at_olf.com]</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Reply To:</FONT></B> =
<FONT SIZE=3D1 FACE=3D"MS Sans =
Serif">ORACLE-L_at_fatcity.com</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Sent:</FONT></B> =
<FONT SIZE=3D1 FACE=3D"MS Sans Serif">Thursday, October 19, 2000 2:50 =
AM</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">To:</FONT></B> =
<FONT SIZE=3D1 FACE=3D"MS Sans Serif">Multiple =
recipients of list ORACLE-L</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"MS Sans Serif">Subject:</FONT></B> =
<FONT SIZE=3D1 FACE=3D"MS Sans =
Serif">Re: urgent</FONT>
</P>
<P><FONT FACE=3D"Arial">Couple of methods to eliminate duplicate values =
, here I go with </FONT>
<BR><FONT FACE=3D"Arial">First Method: </FONT>
<BR><FONT FACE=3D"Arial">delete <table_name> a where rowid > =
(select min(rowid) from <table_name> b </FONT>
<BR><FONT FACE=3D"Arial">where a.col_name =3D b.col_name; </FONT>
</P>
<P><FONT FACE=3D"Arial">Second Method: </FONT>
<BR><FONT FACE=3D"Arial">delete <table_name> a where exists =
(select 'Dupes' from <table_name> b </FONT>
<BR><FONT FACE=3D"Arial">where a.col_name =3D b.col_name and b.rowid =
> a.rowid); </FONT>
</P>
<P><FONT FACE=3D"Arial">Veera </FONT>
<BR><FONT FACE=3D"Arial">Swapna_P wrote: </FONT>
</P>
<UL>
<P><FONT FACE=3D"Arial">=A0 </FONT>
</P>
<P><FONT COLOR=3D"#800080" FACE=3D"Arial">how to delete the duplicate =
records from a table............</FONT><FONT FACE=3D"Arial"> </FONT>
<BR><FONT COLOR=3D"#800080" FACE=3D"Arial">except for one field all the =
rest of the fields are the same,so want to eliminate one =
record</FONT><FONT FACE=3D"Arial"> </FONT>
</P>
<P><FONT COLOR=3D"#800080" FACE=3D"Arial">TIA</FONT><FONT =
FACE=3D"Arial"> </FONT>
<BR><FONT COLOR=3D"#800080" FACE=3D"Arial">swapna</FONT>
Received on Wed Oct 18 2000 - 15:40:34 CDT