Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want to remove duplicates from a table
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00406787
Message ID:
00406853
Views:
47
See my 3 queries I just posted.

>it deleted ones that do not have duplicates. i would like to keep any records that do not have duplicates.
>
>brenda
>
>
>>select keyid, lastname+firstname customer, count(lastname+firstname), max(add_date) from mytable group by 2 having count(lastname+firstname) > 1 into cursor crsTemp
>
>>delete from mytable where lastname+firstname in (select customer from crsTemp) and keyid not in (select keyid from crsTemp)
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform