http://topic.csdn.net/u/20120328/11/36cff895-dbba-47de-b096-b42de778a281.html?62671
其中:
SET DEFAULT TO D:\DATA1
alter table ab070000 add cfield c(10) &&为数据表ab070000.dbf增加一个字段,用于保存数据表名称
replace all cfield with "ab070000"
*use ab070000
for i=1 to 199
if file("ab070"+padl(i,3,"0")+".dbf") && 文件存在,就追加到ab070000中
append from "ab070"+padl(i,3,"0")
replace all cfield with "ab070"+padl(i,3,"0")
for empty(cfield) endif
endfor
browse for gze>2000
CLOSE TABLES
不清楚红色部分?我的理解是开始有replace all cfield with "ab070000",那么empty(cfield)应该不成立?
我这样写,可以吗?
for i=1 to 199
if file("ab070"+padl(i,3,"0")+".dbf") && 文件存在,就追加到ab070000中
append from "ab070"+padl(i,3,"0")
go i
replace cfield with "ab070"+padl(i,3,"0")
endif
endfor