>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!
____________________________________