程序代码:
CLOSE DATABASES USE gg IN 0 ZAP SELECT num, nina FROM ffff GROUP BY 1, 2 INTO CURSOR temp SCAN SELECT * FROM ffff WHERE num = temp.num AND nina = temp.nina ORDER BY num, ny INTO CURSOR temp1 lncnt = 0 SCAN FOR ln = 5 TO FCOUNT() - 2 IF ALLTRIM(EVALUATE(FIELD(ln))) == "探" lncnt = lncnt + 1 IF lncnt = 1 lcny = TRANSFORM(ny) + PADL(SUBSTR(FIELD(ln), 2), 2, "0") ENDIF lcny1 = TRANSFORM(ny) + PADL(SUBSTR(FIELD(ln), 2), 2, "0") ENDIF ENDFOR ENDSCAN lcny = CHRTRAN("abcd,ef,gh", 'abcdefgh', lcny) lcny1 = CHRTRAN("abcd,ef,gh", 'abcdefgh', lcny1) INSERT INTO gg VALUES (temp.num, VAL(LEFT(lcny1, 4)),DATE(&lcny), DATE(&lcny1), lncnt) ENDSCAN SELECT gg BROWSE
坚守VFP最后的阵地