Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Index
Message
From
10/12/1999 14:39:26
 
 
To
10/12/1999 14:26:30
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00301923
Message ID:
00301933
Views:
22
>I want to create a primary index on my table based upon a combination of two fields. It has 2960 records. I ran a query on it with no duplicates checked it appears to have 12 dups of this combination. Whats the best way to find the dups so I can clean them up. There is no reason for the dups. Thanks.
>
>God Bless,
>S Dyke

Steven,

Try this:

Select column1, column2, cnt(column1) as cnt_cols;
from my_table;
group by column1, column2;
order by cnt_cols desc

Where column1 and column2 are the columns you want your primary index on. When you get this query the dup records will be at the top of the query.

HTH

Jeff
Previous
Reply
Map
View

Click here to load this message in the networking platform