Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
To remove exactly duplicated records (all fields) try:
SELECT * FROM sometable INTO sometable2 DISTINCT
>Hi all!
>
>Yet, I have come into a dilemmia that I have been working with for the past couple of months. I think I am at a stumping point. I have this free table with regular indexes. There is over 137,000 records contained in this table. There are some duplicates in this table, which I need to get rid of. However, I have tried the INDEX ON....UNIQUE feature of Fox. The situation is that I have these three fields:
>
>Invoice No
>Description
>Code
>
>The table contains information such as:
>
>LINE Invoice No - Description - Code
>1 1234A Gold CDs CDR-12
>2 1234A Aluminum CD Case CDJ-12
>3 1234A Gold CDs CDR-12
>4 1235B Blue CDs CDR-23
>5 1235B Plastic CD Case CDJ-23
>
>As you can see there are dupicates of the invoice no automatically. Where as I need to filter out the duplicate invoices and delete them. (i.e. Delete Line 3 which is exactly like LINE 1)
>
>I tried INDEXing ON the invoice no and description setting UNIQUE, but it did not fly for me. Are there any suggestions out there for me?
>
>Thanks in advance!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement