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 -> please help with sql-statement(creation)

please help with sql-statement(creation)

From: Steven Cools <Steven_at_digimap.be>
Date: 7 Sep 1998 10:38:51 GMT
Message-ID: <01bdda4b$b19fe390$74faa8c0@steven>


I'm quite desperate...Can u help me ?

    consider next situation: I've got a table X with no primary key or index that contains 3 columns:

string1, string2 and string3

I want to eliminate all the duplicate records (I mean I want string1 to be unique, not the whole
record !!!) but here comes the catch: if string2 begins with 'BE' then I don't want to delete this record. For example:

Table X (columns: string1, string2, string3)


ABC      BE-123       DDD
ABC      CL344       EEE
DDF      BE-123       GGGG
EDKL    DIO             LSI
EDKL    OST            DIOZ

here I want to delete the duplicate values:

ABC BE 344 EEE (because the other ABC record has BE-xxx as string2)
EDKL DIO LSI or EDKL OST DIOZ (I only want to delete 1 of them: which doesn't matter but CERTAINLY NOT BOTH!!!!!)  

thanks for the help !

Steven Cools
Steven_at_digimap.be Received on Mon Sep 07 1998 - 05:38:51 CDT

Original text of this message

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