我刚才把程序改了下,用了set fixed ON
set safe off
SET FIXED ON
set deci to 1
sele a.*,b.b103b17,b.b205 from 204_1.dbf a left join 201-2019.dbf b on a.zzjgdm=b.zzjgdm into dbf 加行业代码
sele *,left(b103b17,2) as hangdai from 加行业代码 into dbf hangdai2
sele a.zzjgdm,a.dwmc,a.C01_1/100000 as dycz,a.C01_2/100000 as dncz,a.C01_3/100000 as tycz,a.C01_4/100000 as tncz,a.C03_1/100000 as xsdy,a.C03_2/100000 as xsdn,a.C03_3/100000 as xsty,a.C03_4/100000 as xstn,a.C04_1/100000 as ckdy,a.C04_2/100000 as ckdn,a.C04_3/100000 as ckty,a.C04_4/100000 as cktn,a.hangdai,b.hangye from hangdai2.dbf a left join 两位行业代码对照全工业.dbf b on a.hangdai=b.hangdai into dbf 204加行业
sum(dncz) to ljcz
sum(xsdn) to xsdnlj
sum(ckdn) to ckdnlj
sum(tncz) to ljtn
SET FIXED ON
set deci to 1
sele count(zzjgdm) as 企业数,sum(dncz),(sum(dncz)/sum(tncz)-1)*100 as czzs,sum(xsdn),(sum(xsdn)/sum(xstn)-1)*100 as xszs,sum(ckdn),(sum(ckdn)/sum(cktn)-1)*100 as ckzs,sum(dycz),(sum(dycz)/sum(tycz)-1)*100 as dyzs from 204加行业.dbf into dbf 总体情况
copy to 1-总体情况 xl5
问题1:set fixed on 放在set deci 之前还是之后,我两种都试了,好像效果都一样
问题2:生成的数据库文件是1位小数,但转成XL5就变成3位小数了
图片附件: 游客没有浏览图片的权限,请
登录 或
注册