vfp中把b表的字段修改为a表对应的值

来源:互联网 发布:小叮小厨餐饮收银软件 编辑:程序博客网 时间:2024/04/26 02:59

很久没用VFP,要把b表的考生号改为a表的相应的(身份证号相等)考生号都弄了好久。

use a in 2
go top
use b in 1
go top
do while not eof(1) and not eof(2)
    select 1
    locate for 身份证号=a.身份证号
    do while found()
        replace 考生号 with a.考生号
        continue
    enddo
    if (not eof(1))
        skip
    else
        go top
    endif
    select 2
    skip
enddo

原创粉丝点击