程序代码:
CLOSE DATABASES SELECT 报名点代码, SPACE(4) 科目 FROM Ls2 WHERE .F. INTO CURSOR Test READWRITE SELECT Ls2 SCAN FOR i =1 TO ALINES(aBkkm, 报考科目, 1, ",") INSERT INTO Test VALUES (Ls2.报名点代码,aBkkm[i]) ENDFOR ENDSCAN SELECT DISTINCT 科目 FROM Test INTO ARRAY aKm cField = "报名点代码 C(6)" FOR i = 1 TO ALEN(aKm) cField = cField + "," +aKm[i] + " N(4)" ENDFOR CREATE CURSOR Stat_Resu (&cField) INSERT INTO Stat_Resu (报名点代码) SELECT DISTINCT 报名点代码 FROM Test INDEX ON 报名点代码 TAG Dm SELECT Test SET RELATION TO 报名点代码 INTO Stat_Resu SCAN REPLACE (Test.科目) WITH EVALUATE(Test.科目) + 1 IN Stat_Resu ENDSCAN SET RELATION TO SELECT Stat_Resu SET ORDER TO BROWSE
坚守VFP最后的阵地