General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only