回复 15楼 sdta
CLOSE DATABASES ALL
SET SAFETY OFF
SET DEFAULT TO C:\Users\xqb\Desktop\世行程序
SELECT *,0000 标记 FROM clf INTO TABLE Test
ALTER TABLE Test add 村1 c(10)
cDkh = ""
ncun = ""
SCAN
IF NOT EMPTY(地块号)
REPLACE 标记 WITH VAL(地块号)
replace 村1 WITH 村
cDkh = 地块号
ncun = 村
ELSE
REPLACE 标记 WITH VAL(cDkh)
REPLACE 村1 WITH ncun
ENDIF
ENDSCAN
SELECT clf
cZdm = ""
FOR nCnt = 1 TO AFIELDS(Azdm)
cZdm = cZdm + "," + Azdm[nCnt, 1]
ENDFOR
cZdm = SUBSTR(cZdm, 2)
SELECT DISTINCT 标记,村 FROM Test INTO CURSOR T_dist
SCAN
SELECT Test
COPY TO ("标段" + T_dist.村 + PADL(T_dist.标记, 4, "0")) TYPE XL5 FIELDS &cZdm FOR 标记 = T_dist.标记 AND 村1 = T_dist.村
ENDSCAN
USE IN Test
ERASE Test.Dbf
版主我这样运行完除了697个表外,还会出现多余的空表,这是怎么回事啊
图片附件: 游客没有浏览图片的权限,请
登录 或
注册