CLOSE ALL
USE "test.dbf"
GO TOP
DO WHILE ! EOF() FOR i=1 TO 10 IF EVALUATE(FIELD(i))=0 LOOP ENDIF cNum=STR(MOD(i,10),1) FOR j=11 TO FCOUNT() cField=FIELD(j) IF cNum$cField IF RECNO()=1 REPLACE &cField WITH 1 ELSE SKIP -1 nNum=&cField SKIP REPLACE &cField WITH nNum+1 ENDIF ENDIF ENDFOR ENDFOR SKIP
ENDDO