Search repeated record in a cursor with FOXPRO

1
CREATE CURSOR oproductos (;
codant c(150),;
marca c(15),;
modelo c(15),;
nroserie c(50),;
codfab c(15),;
nombre c(90))

SELECT oproductos
GOTO TOP

that cursor filled it in a grid with data when importing from excel,

What I need, is to check if in the cursor oproductos has the codant is repeated.

The truth is I'm new to this, but I need the search to be as efficient as possible, hopefully it is not necessary to use a cycle. from now on, thanks

    
asked by Danilo 09.12.2018 в 16:13
source

1 answer

1

So you can know which ones are repeated and how many times:

SELECT codant,COUNT(codant) AS cuantos from DBF('oproductos') INTO CURSOR contar GROUP BY 1
SET FILTER TO cuantos>1
    
answered by 25.12.2018 / 02:24
source