多表按基础表循环处理的问题
帮助.rar
(2.8 KB)
CLOSE DATABASES LOCAL aName[16] aName[ 1] = "ALLOFLAG" aName[ 2] = "FEE" aName[ 3] = "PROVINCE" aName[ 4] = "CITY" aName[ 5] = "COUNTY" aName[ 6] = "STATION" aName[ 7] = "SECT" aName[ 8] = "SEQ_ID" aName[ 9] = "SERIALNO" aName[10] = "FK" aName[11] = "客户ID" aName[12] = "收件人电话" aName[13] = "银行账号" aName[14] = "对账单编号" aName[15] = "分行名称" aName[16] = "收件人手机" cPath = "data\" FOR i = 1 TO ADIR(aFileName, cPath + "*.dbf") USE (cPath + aFileName[i, 1]) FOR ii = 1 TO AFIELDS(aZdm) IF ASCAN(aName, aZdm[ii, 1]) > 0 ALTER TABLE (cPath + aFileName[i, 1]) DROP COLUMN (aZdm[ii, 1]) ENDIF ENDFOR USE ENDFOR