Desktop.rar
(55.99 KB)
只求每天有一丁点儿的进步就可以了
CLOSE DATABASES ALL SELECT DISTINCT km FROM xxcx INTO ARRAY ajg * 生成动态表结构 [color=#808080]*[/color] cZdm = "Id C(8)" FOR nCnt = 1 TO ALEN(ajg, 1) cZdm = cZdm + "," + SUBSTR(ajg[nCnt], 3) - LEFT(ajg[nCnt], 2) + "N(8)" ENDFOR * 创建临时统计表,并向临时统计表中追加 Id 数据及创建索引 [color=#808080]*[/color] CREATE CURSOR tjb (&cZdm) INSERT INTO tjb (Id) SELECT DISTINCT Id FROM xxcx INDEX ON Id TAG Id * 向临时统计表中增加数据 [color=#808080]*[/color] SELECT xxcx SET RELATION TO Id INTO tjb SCAN REPLACE (ALLTRIM(SUBSTR(xxcx.Km, 3)) + LEFT(xxcx.Km, 2)) WITH xxcx.cj IN tjb ENDSCAN SET RELATION TO * 浏览临时统计表 [color=#808080]*[/color] SELECT tjb SET ORDER TO BROWSE