Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Too difficult for me do you know how?
delete from table x
where x.recordid =
(select max(recordid)
from table y
where y.clientid = x.clientid
and y.addressid = x.addressid)
This should delete the record with recordid 2 only.
Hth,
Sybrand Bakker, Oracle DBA
Jobi wrote:
> Hi,
>
> I have a Table with somewhat duplicate record and I would like to delete
> the duplicates Here is an Exemple of the table:
>
> RecordID ClientID AddressID
>
> 1 688 123
> 2 688 123
> 3 783 142
> 4 783 143
>
> Note: RecordID is created on Insert to provide a Unique Number to Index On.
> It is NOT ROWID
>
> Now What I would like to do is get rid of All but ONE of the Records that
> Have the Same ClientID AND AddressID....
>
> Thanks for your help....
>
> Eric
Received on Thu Mar 04 1999 - 17:28:26 CST
![]() |
![]() |