1、原表tb1中需要区分记录的方法(比如学号 xsh、身份证号 sfzh……)
2、只要研究清楚select sql命令的用法就可以了
以下是代码
select distinct kshmdm from tb1 into cursor kctmp order by kskmdm
for I=1 to recount('kctmp')
select kctmp
go I
kmdm=allt(kskmdm)
select xsh from tb1 where allt(ksdmdm)==m.kmdm into cursor tmp
for j=1 to recount('tmp')
select tmp
go j
cxsh=allt(xsh)
select tb1
repl xh with PADL(j, 3, "0") for allt(xsh)==cxsh
endfor
endfor