主题:急盼回复!!
什么都不会的菜鸟。刚才编了一小段,结果有两段有问题,数字出不来。
**********就是米字里面的两段。3和4.报的错误是找不到变量JF,这两小段是一起做的,肯定都有错。我对最基本的建索引本来就不懂。基础知识也没有。麻烦大家帮我看一下吧。谢谢啦。对了,除了这两段数据出不来,其他数据出来都是对的。
set talk off
set stat on
set stat off
set safe off
set cent on
set date ansi
clear all
select khjl,sum(fs) as jf from xx group by khjl into dbf temp_fs
select khjl,count(*) as hs from xx group by khjl into dbf temp_hs
clos all
sele 1
use kaimenhong
repl zhs with 0,zjf with 0,a with 0,b with 0,c with 0,d with 0,e with 0,f with 0,g with 0,qt with 0 all
inde on khjl to temp
**********
sele 3
use temp_fs
khjl1=khjl
sele 1
seek khjl1
if found()
repl zjf with jf
endi
**********
sele 4
use temp_hs
khjl1=khjl
sele 1
seek khjl1
if found()
repl zhs with hs
endi
**********
sele 2
use xx
go top
do while !eof()
khjl1=khjl
lb1=allt(lb)
gh1=gh
do case
case lb1='A'
zdm='a'
case lb1='A'
zdm='a'
case lb1='B'
zdm='b'
case lb1='C'
zdm='c'
case lb1='D'
zdm='d'
case lb1='E'
zdm='e'
case lb1='F'
zdm='f'
case lb1='G'
zdm='g'
case (lb1='H' or lb1='I' or lb1='J' or lb1='K' or lb1='L' or lb1='M' or lb1='N' or lb1='O' or lb1='P' or lb1='Q' or lb1='R' or lb1='S')
zdm='qt'
other
zdm='null'
endc
if dele()
skip
loop
endi
if zdm='null'
else
sele 1
seek khjl1
if found()
repl &zdm with &zdm+1
endi
endi
sele 2
skip
endd
close all
use kaimenhong
copy to xxcj type xl5
close all
erase temp.dbf
erase temp.idx
close all
**********就是米字里面的两段。3和4.报的错误是找不到变量JF,这两小段是一起做的,肯定都有错。我对最基本的建索引本来就不懂。基础知识也没有。麻烦大家帮我看一下吧。谢谢啦。对了,除了这两段数据出不来,其他数据出来都是对的。
set talk off
set stat on
set stat off
set safe off
set cent on
set date ansi
clear all
select khjl,sum(fs) as jf from xx group by khjl into dbf temp_fs
select khjl,count(*) as hs from xx group by khjl into dbf temp_hs
clos all
sele 1
use kaimenhong
repl zhs with 0,zjf with 0,a with 0,b with 0,c with 0,d with 0,e with 0,f with 0,g with 0,qt with 0 all
inde on khjl to temp
**********
sele 3
use temp_fs
khjl1=khjl
sele 1
seek khjl1
if found()
repl zjf with jf
endi
**********
sele 4
use temp_hs
khjl1=khjl
sele 1
seek khjl1
if found()
repl zhs with hs
endi
**********
sele 2
use xx
go top
do while !eof()
khjl1=khjl
lb1=allt(lb)
gh1=gh
do case
case lb1='A'
zdm='a'
case lb1='A'
zdm='a'
case lb1='B'
zdm='b'
case lb1='C'
zdm='c'
case lb1='D'
zdm='d'
case lb1='E'
zdm='e'
case lb1='F'
zdm='f'
case lb1='G'
zdm='g'
case (lb1='H' or lb1='I' or lb1='J' or lb1='K' or lb1='L' or lb1='M' or lb1='N' or lb1='O' or lb1='P' or lb1='Q' or lb1='R' or lb1='S')
zdm='qt'
other
zdm='null'
endc
if dele()
skip
loop
endi
if zdm='null'
else
sele 1
seek khjl1
if found()
repl &zdm with &zdm+1
endi
endi
sele 2
skip
endd
close all
use kaimenhong
copy to xxcj type xl5
close all
erase temp.dbf
erase temp.idx
close all