Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking duplicate values
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01335071
Message ID:
01335074
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
>Checking duplicate values
>
>I created two cursors
>But it takes too long because VFP has to scan all records in both cursors
>
>It there a better method the this below ?
>
>************************************************************
> SELECT AP
> SCAN
> SELECT AP2
> aax = 0
> SCAN FOR AP2.ID2 = AP.ID2
> aax = aax + 1
> IF aax > 1
> = MESSAGEBOX("Duplicated record")
> endif
> ENDSCAN
> ENDSCAN
> = MESSAGEBOX ("endSCAN")
>**********************************************************
If you are looking for duplicate records in AP try..

select * from AP where 1<(select count(*) from ap as ap2 where ap.ID2 = ap2.ID2) order by ID2
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform