Thread: Delete duplicated rows

Delete duplicated rows

From
papapep
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Has anybody done a query to delete duplicated rows in a table??

Thanks in advance.

Josep Sànchez
[papapep]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/LleU2vx52x0kyz4RAsSoAJ9SLN/UBSek25DwwDXHGovmov5LEwCfUCC4
5R7l2JfcdlJUoCOUP2OorCE=
=j0En
-----END PGP SIGNATURE-----




Re: Delete duplicated rows

From
Larry Rosenman
Date:

--On Monday, August 04, 2003 14:54:45 +0200 papapep <papapep@gmx.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Has anybody done a query to delete duplicated rows in a table??
you can use OID or CTID.



--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


Re: Delete duplicated rows

From
greg@turnstep.com
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Has anybody done a query to delete duplicated rows in a table??


http://www.gtsm.com/oscon2003/deletetid.html


- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200308040930
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE/LmAevJuQZxSWSsgRAjpmAJoCbWVtgSeDE2hjINPzI3RxE8IVNgCgkUUO
3ZsA2oEc02a65VeKCBBzB2k=
=PxcP
-----END PGP SIGNATURE-----



Re: Delete duplicated rows

From
papapep
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks to all for your answer (including Duncan that has replied to my
private mailbox), but I think all of them are thinking of removing rows
that have one field that is repeated in other rows.
My problem is that the WHOLE row is repeated, so I have to find
something like this:

FIELDS    1    2    3    4    5    6    7
Row 1    my    car    is    blue    and    very    fast *
Row 2    your     car    is    green    and     quite    fast
Row 3    my    car    is    blue    and    very    fast *
Row 4    my    car    is    blue    and    very    big
Row 5    my    car    is    red    and    very    fast
Row 6    my    car    is    blue    and    very    fast *

* Totally duplicated rows

What do you think about making a query trying to get only the no
duplicated rows, insert them in a temporary table and after deleting all
the rows from the original table reinsert the temporary table's rows
into the empty one?? Perhaps is a little bit silly, but it's the only
way I see....


Thanks once again.

Josep Sànchez
[papapep]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/LpeE2vx52x0kyz4RAvzqAKC1pA27F1u/mzoPs6BY1bFgaGQk6wCeL40U
whmWGXWGT56Ec61vC81yorA=
=exh7
-----END PGP SIGNATURE-----