sele * from 表 where recn()<=5000 into dbf A5000
sele * from 表 where recn() betw 5001 and 10000 into dbf A10000
sele * from 表 where recn()>10000 into dbf A15000
SELECT CTABNAME
N=5000 && 可以修改N的值,随便多少条记录生成一个表
FOR I=1 TO CEILING(RECCOUNT()/N) && 根据N值的不同,可以生成CEILING(RECCOUNT()/N)个表 SELECT * FROM CTABNAME WHERE RECNO()>(I-1)*N AND RECNO()<=I*N INTO TABLE [A]+TRANSFORM(I*N)
ENDFOR