select 职称 DISTINCT from yourtable into cursor mytable
select mytable
go top
do while !eof()
select yourtable
set filter to 职称=mytable.职称
go top
number=1
do while !eof()
replace 记录号 with number
skip
number=number+1
enddo
select mytable
skip
enddo
select mytable
go top
do while !eof()
select yourtable
set filter to 职称=mytable.职称
go top
number=1
do while !eof()
replace 记录号 with number
skip
number=number+1
enddo
select mytable
skip
enddo

认真看书学习,弄通Fox主义。