求助:如何将一个 dbf 按某个字段分成多个 dbf(不是用命令那种)
一个dbf表有上万条记录,都有字段销售代码 xsdm ,01,02,03,04···100 ,怎样根据xsdm将这上万条记录快速分成100个dbf表,不用copy to *** for xsdm=‘01’ 这种,跪求
2020-05-27 11:57
2020-05-27 12:12


2020-05-27 12:52




2020-05-27 13:15
2020-05-27 13:21
2020-05-27 14:13
[此贴子已经被作者于2020-5-27 14:43编辑过]

2020-05-27 14:16
程序代码:* 假定此时数据表 Tab1 已经打开了
local cFile as string ,cFGS as string
select distinct 驻外分公司 from Tab1 into cursor tmp1
select tmp1
scan
cFGS = rtrim(tmp1.驻外分公司)
cFile = "E:\ftp\" + cFGS + "\通报数据" + cFGS + ".xls"
select * from Tab1 where Tab1.驻外分公司 = cFGS into cursor tmp2
if recc('tmp2') > 0 then
if file(cFile) then
dele file &cFile
endif
select tmp2
copy to &cFile type xl5
endif
use in tmp2
endscan
use in tmp1
[此贴子已经被作者于2020-5-27 14:41编辑过]
2020-05-27 14:39
2020-05-29 08:05