CLOSE DATABASES ALL cZdm = "Kh C(9)" FOR nCnt = 1 TO 15 cZdm = cZdm + ", " + "Zd" + PADL(nCnt, 2, "0") + " N(4)" ENDFOR CREATE CURSOR tjb (&cZdm) USE 全体 IN 0 ALIAS qt SELECT qt SCAN LOCAL aSj[16] aSj = 0 aSj[1] = qt.Kh FOR nCnt = 2 TO 16 DO CASE CASE BETWEEN(nCnt, 2, 15) cStr = SUBSTR(da1, (nCnt-2) * 5 + 1 ,5) OTHERWISE cStr = SUBSTR(da1, 71 ,10) ENDCASE FOR ii = 1 TO LEN(cStr) cStr1 = SUBSTR(cStr, ii, 1) aSj[nCnt] = aSj[nCnt] + ICASE(cStr1 == "A", 10,cStr1 == "B", 9,cStr1 == "C", 8,cStr1 == "D", 7, 0) ENDFOR ENDFOR INSERT INTO tjb FROM ARRAY aSj ENDSCAN SELECT tjb BROWSE
[此贴子已经被作者于2019-1-23 23:33编辑过]