RE: Duplicate Data Delete
Posted in 2005
You could run something like this:
Unload to in_case_I_screw_up
Select * from my_table;
Unload to my_file
Select count(*), * from my_table
Group by field1, field2, etc;
Create temp table foo ( dummy integer,
Field1 type,
Field2 type,
... );
load from my_file insert into foo;
delete from my_table where 1 = 1;
insert into my_table select field1, field2, etc
from foo
The idea is to create a temp table that looks just like your old one,
except that it has a dummy field first, to hold the counter, which you
drop when you repopulate your original table.
--EEM
> -----Original Message-----
> From: Alejandro Mendoza [mailto:alejandro@sinnova-ti.com]
> Sent: Thursday, September 01, 2005 3:32 PM
> To: 'Prashant Shirude'; informix-list@iiug.org
> Cc: alejandro@sinnova-ti.com
> Subject: RE: Duplicate Data Delete
>
> You can use ROWID to filter the rows to delete.
> SELECT ROWID,* FROM <table>> Then use the rowid for the row you want delete.
> DELETE FROM <table>
> WHERE ROWID=####
>
> -----Mensaje original-----
> De: owner-informix-list@iiug.org [mailto:owner-informix-list@iiug.org]
En
> nombre de Prashant Shirude
> Enviado el: Jueves, 01 de Septiembre de 2005 10:15 a.m.
> Para: informix-list@iiug.org
> Asunto: Duplicate Data Delete
>
> Does any one has a query to delete duplicate data? I need a query to
> delete duplicate data.
>
> --Prashant
> Database Analyst
> sending to informix-list
> sending to informix-list
sending to informix-list