手机可靠性测试好做吗:关于visual foxpro的查找与替换的问题

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/01 01:12:55
[VFP]有A、B两个表,公有字段为“编号”,请问我想把A表与B表“编号”字段相同的记录在A表的“备注”字段中用“*”标记出来,该如何操作?

gljqd的答案必须要简历索引和关联才行,我编写一个程序:
close all
use b
sele 0
use a
do while not eof()
bianhao=编号
sele b
loca for 编号=bianhao
if not eof()
sele a
repl 备注 with "*"
endif
sele a
skip
enddo

use a
use b
REPLACE a.备注 WITH '*' ALL FOR a.编号 = b.编号

update A表 set 编号='*' where 编号 in (select 编号 from B表)