程序代码:
SELECT DISTINCT " " xh,xm,SPACE(240) kmnr, 0000 zks FROM t1 INTO CURSOR t2 READWRITE SELECT t2 INDEX on xm TAG XM SELECT t1 SET RELATION TO xm INTO "t2" REPLACE ALL t2.xh WITH PADL(RECNO("t2"),3,"0"),; t2.kmnr WITH t2.kmnr-t1.nj-t1.bj-t1.km-",",; t2.zks WITH t2.zks+t1.ks SET RELATION TO SELECT t2 REPLACE ALL kmnr WITH kmnr-"计"-TRANSFORM(zks)-"节" SELECT * FROM t2