回复 10楼 mywisdom88
受教了,谢谢
*!* 建立测试表
CLOSE DATABASES
t1 = "c:\" + "t1.dbf"
t2 = "d:\" + "t2.dbf"
create TABLE &t1(id i,f1 c(10))
create TABLE &t2(id i,f1 c(10))
insert into t1(id,f1) values (1,"")
insert into t1(id,f1) values (2,"")
insert into t1(id,f1) values (3,"")
insert into t2(id,f1) values (1,"t1")
insert into t2(id,f1) values (2,"t2")
insert into t2(id,f1) values (4,"t4")
CLOSE DATABASES && 关闭建立的表,此时VFP环境中,没有打开的表了。
*!* 假设不知道2个表的名称,用别名,表路径,用宏
update p1 set p1.f1=p2.f1 from &t1 as p1 ,&t2 as p2 where p1.id = p2.id
BROWSE