lnNewSno = 0
lnOldSno = -1
SELECT table1
SCAN
IF table1.sno <> lnOldSno
lnOldSno = table1.sno
lnNewSno = lnNewSno + 1
ENDIF
REPLACE sno WITH lnNewSno
ENDSCAN
>
>I have a table entitled "Table1" containing following fields
>
>sno n(3)
>name c(20)
>
>Data in Table1 is as
>
>2 eric
>3 mike
>3 gagnon
>3 robert
>1 danial
>4 romani
>
>I want to replace sno, first field, with digits from 1 to !eof() but on every unique occourance as
>
>1 eric
>2 mike
>2 gagnon
>2 robert
>3 danial
>4 romani
>
>I mean the data of second field, name, must not change its order only first field should replace.
>
--sb--