foxpro中用程序文件比较2个数据库

来源:百度知道 编辑:UC知道 时间:2024/05/15 15:04:26
有2个数据库A和B,A数据库包含B数据库的内容,A和B里面都有一个“编号”字段,现在要通过对A和B的“编号”字段进行比较,在A中找出所有B的内容,并将此内容生成文件C
要用foxpro中modi comm 程序文件实现,麻烦

*程序内容如下
close all data
set talk off
set exac on
use 表A
copy to 表C
use 表B
sele 2
use 表C
for i=1 to recc()
sele 2
goto i
hm=allt(编号)
sele 1
loca all for hm=allt(编号)
if eof()
sele 2
dele
endif
endfor
sele 2
pack