Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Browse for duplicates
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00580628
Message ID:
00580652
Views:
20
>Every now and again I am asked to take a look for duplicates in t table. I would like to be able to set a filter to something so that I only see duplcates in the browse window on a particular fields. Set filter blows up things so if there is another way, please forward it. Thanks

You can
1. select key fields of the duplicate records into cursor.
2. set relation to this cursor from your table
3. Browse the table using this relation
SELECT orgtracnum, date, amount, bankname, count(*) as CntDupRecss ;
  FROM mytable ;
  GROUP BY 1,2,3,4 ;
  HAVING CntDupRecss > 1
  INTO CURSOR crsDupRecss 

INDEX ON orgtracnum + DTOS(date) + STR( amount, 10,2) +  bankname

SELECT mytable
SET RELATION TO orgtracnum + DTOS(date) + STR( amount, 10,2) +  bankname ;
    INTO crsDupRecss 

BROWSE FOR FOUND("crsDupRecss")
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform