Subject | Re: [ib-support] Help with duplicated data |
---|---|
Author | Ann W. Harrison |
Post date | 2001-06-22T17:45:26Z |
At 03:45 PM 6/22/2001 +0000, Orlando Jimenez wrote:
delete from client c where exists
(select 1 from client o
where o.AccNew = c.AccNews
and o.AccOld = c.AccOld
and o.Inst = c.Inst
and o.Name = c.Name
and o.rdb$db_key < c.rdb$db_key);
Regards,
Ann
www.ibphoenix.com
We have answers.
>I have the following tableSomething like this should work:
>
>Client (
> AccNew Varchar(255),
> AccOld Varchar(255),
> Inst LONGTEXT,
> name Varchar(255));
>
>(*LONGTEXT, I use this data type in BDE with delphi)
>
>This table don't have index neither primary key, of course I have a
>duplicity in the data of this table.
>
>I need a way to remove the duplicated data considering the field
>AccNew my primary key(I want one record by AccNew)
delete from client c where exists
(select 1 from client o
where o.AccNew = c.AccNews
and o.AccOld = c.AccOld
and o.Inst = c.Inst
and o.Name = c.Name
and o.rdb$db_key < c.rdb$db_key);
Regards,
Ann
www.ibphoenix.com
We have answers.