Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> sql-statement needed
hi,
consider next situation: I've got a table X with no primary key or index that contains 3 columns:
string1, string2 and string3
What I want to accomplish is to eliminate all the duplicate records (that's quite easy) 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 BE 344 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
!!!!!)
Can somebody help ? Thanks,
Cools Steven
Steven_at_digimap.be
Received on Fri Aug 28 1998 - 04:45:11 CDT