Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cleaning up a free table
Message
From
16/01/2001 14:42:56
 
 
To
16/01/2001 14:03:23
N. Lea
Nic Cross Enterprises
Valencia, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00464323
Message ID:
00464341
Views:
25
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
Map
View

Click here to load this message in the networking platform