Hi Rolland, Here the script for check the the duplicate row as per your email.
select ean from table_name where varutyp=3 group y ean having count(ean) >1; For deleting the duplicate rows : delete table_name where ean in (select ean from table_name group by ean having count(ean)>1) and varutyp =3; regards, Bernardus Deddy Hoeydiono. -----Original Message----- [EMAIL PROTECTED] Sent: Wednesday, January 08, 2003 3:24 PM To: Multiple recipients of list ORACLE-L Hallo, I have this sql, SELECT * FROM varukorgtmp where varukorgid= 120 That makes the result of this testfile.xls (See attached file: start.xls) There are two values in EAN-field, which are the same 23324614 in row 2 and 3 Now I want in an sql script to check out which are the duplicates of EAN in that table. Then then the script will check which is VARUTYP = 3, then delete the record(s) which have VARUTYP =3. So the result should be like this, with only two rows left in this case). (See attached file: result.xls) I would really appreciate if anyone could help me with this sql I have tried several sql, but with no luck. Thanks in advance Roland -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Bernardus Deddy Hoeydiono INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).