宫
宫雨
Unregistered / Unconfirmed
GUEST, unregistred user!
CLBMK 为 一个72 个字段的表
CREATE TABLE CLBMK (
BH VARCHAR(4),
BM VARCHAR(9),
BJBH VARCHAR(12),
MC VARCHAR(20),
XH VARCHAR(20),
DV VARCHAR(4),
SDJ DOUBLE PRECISION,
JDJ DOUBLE PRECISION,
DZ VARCHAR(1),
DZ1 VARCHAR(1),
YJL VARCHAR(1),
WZXZ VARCHAR(8),
SCCJ SMALLINT,
BAOJ1 DOUBLE PRECISION,
BAOJ2 DOUBLE PRECISION,
BAOJ3 DOUBLE PRECISION,
BCJ1 VARCHAR(20),
BCJ2 VARCHAR(20),
BCJ3 VARCHAR(20),
NCDJ DOUBLE PRECISION,
MAXDJ DOUBLE PRECISION,
MINDJ DOUBLE PRECISION,
DZL DOUBLE PRECISION,
ZZC DOUBLE PRECISION,
ZZQ DOUBLE PRECISION,
GCSL DOUBLE PRECISION,
GCJE DOUBLE PRECISION,
DCSL DOUBLE PRECISION,
DCJE DOUBLE PRECISION,
NCSL DOUBLE PRECISION,
NCJE DOUBLE PRECISION,
DQSL DOUBLE PRECISION,
DQJE DOUBLE PRECISION,
KW VARCHAR(11),
KB VARCHAR(10),
DAT_ DATE,
DJSJ DOUBLE PRECISION,
SRL1 DOUBLE PRECISION,
SRJ1 DOUBLE PRECISION,
SRL2 DOUBLE PRECISION,
SRJ2 DOUBLE PRECISION,
SRL3 DOUBLE PRECISION,
SRJ3 DOUBLE PRECISION,
SRL4 DOUBLE PRECISION,
SRJ4 DOUBLE PRECISION,
SRL5 DOUBLE PRECISION,
SRJ5 DOUBLE PRECISION,
SRL6 DOUBLE PRECISION,
SRJ6 DOUBLE PRECISION,
SRL7 DOUBLE PRECISION,
SRJ7 DOUBLE PRECISION,
SRL8 DOUBLE PRECISION,
SRJ8 DOUBLE PRECISION,
SRL DOUBLE PRECISION,
SRJ DOUBLE PRECISION,
SRD DOUBLE PRECISION,
FCL1 DOUBLE PRECISION,
FCJ1 DOUBLE PRECISION,
FCL2 DOUBLE PRECISION,
FCJ2 DOUBLE PRECISION,
FCL3 DOUBLE PRECISION,
FCJ3 DOUBLE PRECISION,
FCL4 DOUBLE PRECISION,
FCJ4 DOUBLE PRECISION,
FCL5 DOUBLE PRECISION,
FCJ5 DOUBLE PRECISION,
FCL6 DOUBLE PRECISION,
FCJ6 DOUBLE PRECISION,
FCL DOUBLE PRECISION,
FCJ DOUBLE PRECISION,
FCD DOUBLE PRECISION,
QMSL DOUBLE PRECISION,
QMJE DOUBLE PRECISION,
KGYH SMALLINT,
BJJ VARCHAR(2),
PD SMALLINT,
JDJ1 DOUBLE PRECISION,
JHYH SMALLINT,
SRJS DOUBLE PRECISION,
YZF DOUBLE PRECISION,
RGLFE DOUBLE PRECISION,
ZZSE DOUBLE PRECISION,
FKJ DOUBLE PRECISION,
FCJS DOUBLE PRECISION,
GLFE DOUBLE PRECISION,
ZJE DOUBLE PRECISION
)
clmxyk,clmx 为 42 个字段的表
CREATE TABLE CLMXYK (
BH VARCHAR(4),
BM VARCHAR(9),
MC VARCHAR(20),
XH VARCHAR(20),
DV VARCHAR(4),
JDJ DOUBLE PRECISION,
SDJ DOUBLE PRECISION,
SCCJ SMALLINT,
DWBH SMALLINT,
DZ VARCHAR(1),
DZ1 VARCHAR(1),
YJL VARCHAR(1),
BJBH VARCHAR(12),
CLYT VARCHAR(14),
SRL1 DOUBLE PRECISION,
SRJ1 DOUBLE PRECISION,
SRL2 DOUBLE PRECISION,
SRJ2 DOUBLE PRECISION,
SRL3 DOUBLE PRECISION,
SRJ3 DOUBLE PRECISION,
SRL4 DOUBLE PRECISION,
SRJ4 DOUBLE PRECISION,
SRL5 DOUBLE PRECISION,
SRJ5 DOUBLE PRECISION,
SRL6 DOUBLE PRECISION,
SRJ6 DOUBLE PRECISION,
SRL7 DOUBLE PRECISION,
SRJ7 DOUBLE PRECISION,
SRL8 DOUBLE PRECISION,
SRJ8 DOUBLE PRECISION,
SRL DOUBLE PRECISION,
SRJ DOUBLE PRECISION,
SRD DOUBLE PRECISION,
SRJS DOUBLE PRECISION,
YZF DOUBLE PRECISION,
RGLFL DOUBLE PRECISION,
RGLFE DOUBLE PRECISION,
FCL1 DOUBLE PRECISION,
FCJ1 DOUBLE PRECISION,
FCL2 DOUBLE PRECISION,
FCJ2 DOUBLE PRECISION,
FCL3 DOUBLE PRECISION,
FCJ3 DOUBLE PRECISION,
FCL4 DOUBLE PRECISION,
FCJ4 DOUBLE PRECISION,
FCL5 DOUBLE PRECISION,
FCJ5 DOUBLE PRECISION,
FCL6 DOUBLE PRECISION,
FCJ6 DOUBLE PRECISION,
FCL DOUBLE PRECISION,
FCJ DOUBLE PRECISION,
FCD DOUBLE PRECISION,
FCJS DOUBLE PRECISION,
GLFE DOUBLE PRECISION,
QCJE DOUBLE PRECISION,
QMSL DOUBLE PRECISION,
QMJE DOUBLE PRECISION,
DAT_ DATE,
SFBH VARCHAR(9),
CGYH SMALLINT,
KGYH SMALLINT,
YLD VARCHAR(10),
KDBH VARCHAR(12),
GLFL DOUBLE PRECISION,
ZJE DOUBLE PRECISION,
ZZSL DOUBLE PRECISION,
ZZSE DOUBLE PRECISION,
FKJ DOUBLE PRECISION,
GCBH VARCHAR(20),
CJMC VARCHAR(20),
WZXZ VARCHAR(10),
CGYM VARCHAR(8)
)
以下为源程序:
define window input from 8,15 to 17,65;
double;
shadow;
color scheme 5
activate window input
dimension bt(20)
*@ 5,8 say '不满两位补0'
*@ 3,8 say '汇总月份:' get mon;
pict "99";
size 1,2;
default ''
*read
use clmxyk
m.date=date
use clbmk
clea
@ 2,10 say '现 在 正 在 汇 总 '+str(month(m.date),2)+'月 数 据'
@ 4,14 say "..................."
copy to aa
use aa
@ 4,14 say "*"
appe from clmxyk
*dele for srj=0 .and. fcj=0
*pack
@ 4,col() say "*"
inde on bm to clin
@ 4,col() say "*"
total on bm to hzyb fields srl1,srl2,srl3,srl4,srl5,srl6,srl7,srl8,;
srj1,srj2,srj3,srj4,srj5,srj6,srj7,srj8,srd,srjs,yzf,zzse,rglfe,fcl1,fcl2,fcl3,fcl4,fcl5,;
fcj1,fcj2,fcj3,fcj4,fcj5,fcd,fcjs,glfe
@ 4,col() say "*"
use hzyb
repl all bh with substr(bm,1,2)
repl all srj with srj1+srj2+srj3+srj4+srj5+srj6+srj7+srj8
repl all srl with srl1+srl2+srl3+srl4+srl5+srl6+srl7+srl8
repl all fcj with fcj1+fcj2+fcj3+fcj4+fcj5
repl all fcl with fcl1+fcl2+fcl3+fcl4+fcl5
repl all fkj with srjs+zzse+rglfe+yzf,zje with glfe+fcjs
repl all qmsl with ncsl+srl-fcl,qmje with ncje+srj-fcj
@ 4,col() say "*"
inde on bh tag bh
total on bh to bk0
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdl
set rela to bh into bk0
for i=1 to 8
g=str(i,1)
repl all srj&g with bk0.srj&g
endfor
repl all srjs with bk0.srjs,yzf with bk0.yzf,zzse with bk0.zzse
repl all srd with bk0.srd,fcd with bk0.fcd,rglfe with bk0.rglfe
for i=1 to 5
g=str(i,1)
repl all fcj&g with bk0.fcj&g
endfor
repl all glfe with bk0.glfe,fcjs with bk0.fcjs
repl all srj1 with srj1+srj6
repl all srj6 with 0
repl all srj with srj1+srj2+srj3+srj4+srj5+srj6+srj7+srj8,;
fcj with fcj1+fcj2+fcj3+fcj4+fcj5
repl all fkj with srjs+yzf+rglfe+zzse,zje with glfe+fcjs
repl all ncje with bk0.ncje
repl all qmje with ncje+srj-fcj,date with date()
@ 4,col() say "*"
set rela off into bk0
close all data
&&& 汇总月库 &&&
use clmxyk
inde on bh to bh
total on bh to bk0 fields srl1,srl2,srl3,srl4,srl5,srl6,srl7,srl8,;
srj1,srj2,srj3,srj4,srj5,srj6,srj7,srj8,zzse,yzf,srjs,rglfe,srd,fcl1,fcl2,fcl3,fcl4,fcl5,;
fcj1,fcj2,fcj3,fcj4,fcj5,fcd,glfe,fcjs
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdly
set rela to bh into bk0
repl all srd with bk0.srd,fcd with bk0.fcd
for i=1 to 8
g=str(i,1)
repl all srj&g with bk0.srj&g
endfor
repl all srjs with bk0.srjs,yzf with bk0.yzf,zzse with bk0.zzse
repl all fcjs with bk0.fcjs,glfe with bk0.glfe,rglfe with bk0.rglfe
for i=1 to 5
g=str(i,1)
repl all fcj&g with bk0.fcj&g
endfor
repl all srj1 with srj1+srj6
repl all srj6 with 0
set rela off into bk0
sele 1
use clbmk order bh
total on bh to bk0 field qmje
use bk0
inde on bh to aa
sele 2
use clhzdly
set rela to bh into bk0
repl all srj1 with srj1+srj6
repl all srj6 with 0
repl all srj with srj1+srj2+srj3+srj4+srj5+srj6+srj7+srj8,;
fcj with fcj1+fcj2+fcj3+fcj4+fcj5
repl all fkj with zzse+srjs+rglfe+yzf,zje with glfe+fcjs
repl all qcje with bk0.qmje
repl all qmje with qcje+srj-fcj
@ 4,col() say "*"
set rela off into bk0
close all data
&&& 求月收/发项数 &&&
use clmxyk
copy to bb field bh,bm,srd,srj,fcd,fcj
use bb
inde on bm to clin
total on bm to aa
use aa
repl all for srj<>0 srd with 1
repl all for fcj<>0 fcd with 1
@ 4,col() say "*"
inde on bh to aa
total on bh to bk0
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdly
set rela to bh into bk0
repl all srd1 with bk0.srd,fcd1 with bk0.fcd
set rela off into bk0
close all data
@ 4,col() say "*"
&&& 求年收/发项数 &&&
use bb
appe from clmx
inde on bm to clin
total on bm to aa
use aa
repl all for srj<>0 srd with 1
repl all for fcj<>0 fcd with 1
@ 4,col() say "*"
inde on bh to aa
total on bh to bk0
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdl
set rela to bh into bk0
repl all srd1 with bk0.srd,fcd1 with bk0.fcd
set rela off into bk0
close all data
@ 4,col() say "*"
&&& 求期初/期末项数 &&&
use clbmk
copy to aa field bh,bm,dqsl,dqje,qmsl,qmje,ncsl,ncje
use aa
repl all bh with substr(bm,1,2),qmsl with 0,dqsl with 0,ncsl with 0
repl all for dqje<>0 dqsl with 1
repl all for qmje<>0 qmsl with 1
repl all for ncje<>0 ncsl with 1
@ 4,col() say "*"
inde on bh to aa
total on bh to bk0
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdly
set rela to bh into bk0
repl all qcd with bk0.qmsl,qmd with bk0.dqsl
use clhzdl
set rela to bh into bk0
repl all qcd with bk0.ncsl,qmd with bk0.dqsl
set rela off into bk0
@ 4,col() say "*"
close all data
&&& 生成查询库 &&&
use clhzdl
copy to clhz
copy to aa
use aa
repl all bb with '0'
inde on bb to aa
total on bb to cc
use cc
repl mc with "合 计",bh with ' '
use clhz
appe from cc
use clhzdly
copy to clhzy
copy to aa
use aa
repl all bb with '0'
inde on bb to aa
total on bb to cc
use cc
repl mc with "合 计",bh with ' '
use clhzy
appe from cc
?chr(7)
?chr(7)
clear
@ 4,15 say '汇 总 完 毕'
wait
use
clear windows
return
CREATE TABLE CLBMK (
BH VARCHAR(4),
BM VARCHAR(9),
BJBH VARCHAR(12),
MC VARCHAR(20),
XH VARCHAR(20),
DV VARCHAR(4),
SDJ DOUBLE PRECISION,
JDJ DOUBLE PRECISION,
DZ VARCHAR(1),
DZ1 VARCHAR(1),
YJL VARCHAR(1),
WZXZ VARCHAR(8),
SCCJ SMALLINT,
BAOJ1 DOUBLE PRECISION,
BAOJ2 DOUBLE PRECISION,
BAOJ3 DOUBLE PRECISION,
BCJ1 VARCHAR(20),
BCJ2 VARCHAR(20),
BCJ3 VARCHAR(20),
NCDJ DOUBLE PRECISION,
MAXDJ DOUBLE PRECISION,
MINDJ DOUBLE PRECISION,
DZL DOUBLE PRECISION,
ZZC DOUBLE PRECISION,
ZZQ DOUBLE PRECISION,
GCSL DOUBLE PRECISION,
GCJE DOUBLE PRECISION,
DCSL DOUBLE PRECISION,
DCJE DOUBLE PRECISION,
NCSL DOUBLE PRECISION,
NCJE DOUBLE PRECISION,
DQSL DOUBLE PRECISION,
DQJE DOUBLE PRECISION,
KW VARCHAR(11),
KB VARCHAR(10),
DAT_ DATE,
DJSJ DOUBLE PRECISION,
SRL1 DOUBLE PRECISION,
SRJ1 DOUBLE PRECISION,
SRL2 DOUBLE PRECISION,
SRJ2 DOUBLE PRECISION,
SRL3 DOUBLE PRECISION,
SRJ3 DOUBLE PRECISION,
SRL4 DOUBLE PRECISION,
SRJ4 DOUBLE PRECISION,
SRL5 DOUBLE PRECISION,
SRJ5 DOUBLE PRECISION,
SRL6 DOUBLE PRECISION,
SRJ6 DOUBLE PRECISION,
SRL7 DOUBLE PRECISION,
SRJ7 DOUBLE PRECISION,
SRL8 DOUBLE PRECISION,
SRJ8 DOUBLE PRECISION,
SRL DOUBLE PRECISION,
SRJ DOUBLE PRECISION,
SRD DOUBLE PRECISION,
FCL1 DOUBLE PRECISION,
FCJ1 DOUBLE PRECISION,
FCL2 DOUBLE PRECISION,
FCJ2 DOUBLE PRECISION,
FCL3 DOUBLE PRECISION,
FCJ3 DOUBLE PRECISION,
FCL4 DOUBLE PRECISION,
FCJ4 DOUBLE PRECISION,
FCL5 DOUBLE PRECISION,
FCJ5 DOUBLE PRECISION,
FCL6 DOUBLE PRECISION,
FCJ6 DOUBLE PRECISION,
FCL DOUBLE PRECISION,
FCJ DOUBLE PRECISION,
FCD DOUBLE PRECISION,
QMSL DOUBLE PRECISION,
QMJE DOUBLE PRECISION,
KGYH SMALLINT,
BJJ VARCHAR(2),
PD SMALLINT,
JDJ1 DOUBLE PRECISION,
JHYH SMALLINT,
SRJS DOUBLE PRECISION,
YZF DOUBLE PRECISION,
RGLFE DOUBLE PRECISION,
ZZSE DOUBLE PRECISION,
FKJ DOUBLE PRECISION,
FCJS DOUBLE PRECISION,
GLFE DOUBLE PRECISION,
ZJE DOUBLE PRECISION
)
clmxyk,clmx 为 42 个字段的表
CREATE TABLE CLMXYK (
BH VARCHAR(4),
BM VARCHAR(9),
MC VARCHAR(20),
XH VARCHAR(20),
DV VARCHAR(4),
JDJ DOUBLE PRECISION,
SDJ DOUBLE PRECISION,
SCCJ SMALLINT,
DWBH SMALLINT,
DZ VARCHAR(1),
DZ1 VARCHAR(1),
YJL VARCHAR(1),
BJBH VARCHAR(12),
CLYT VARCHAR(14),
SRL1 DOUBLE PRECISION,
SRJ1 DOUBLE PRECISION,
SRL2 DOUBLE PRECISION,
SRJ2 DOUBLE PRECISION,
SRL3 DOUBLE PRECISION,
SRJ3 DOUBLE PRECISION,
SRL4 DOUBLE PRECISION,
SRJ4 DOUBLE PRECISION,
SRL5 DOUBLE PRECISION,
SRJ5 DOUBLE PRECISION,
SRL6 DOUBLE PRECISION,
SRJ6 DOUBLE PRECISION,
SRL7 DOUBLE PRECISION,
SRJ7 DOUBLE PRECISION,
SRL8 DOUBLE PRECISION,
SRJ8 DOUBLE PRECISION,
SRL DOUBLE PRECISION,
SRJ DOUBLE PRECISION,
SRD DOUBLE PRECISION,
SRJS DOUBLE PRECISION,
YZF DOUBLE PRECISION,
RGLFL DOUBLE PRECISION,
RGLFE DOUBLE PRECISION,
FCL1 DOUBLE PRECISION,
FCJ1 DOUBLE PRECISION,
FCL2 DOUBLE PRECISION,
FCJ2 DOUBLE PRECISION,
FCL3 DOUBLE PRECISION,
FCJ3 DOUBLE PRECISION,
FCL4 DOUBLE PRECISION,
FCJ4 DOUBLE PRECISION,
FCL5 DOUBLE PRECISION,
FCJ5 DOUBLE PRECISION,
FCL6 DOUBLE PRECISION,
FCJ6 DOUBLE PRECISION,
FCL DOUBLE PRECISION,
FCJ DOUBLE PRECISION,
FCD DOUBLE PRECISION,
FCJS DOUBLE PRECISION,
GLFE DOUBLE PRECISION,
QCJE DOUBLE PRECISION,
QMSL DOUBLE PRECISION,
QMJE DOUBLE PRECISION,
DAT_ DATE,
SFBH VARCHAR(9),
CGYH SMALLINT,
KGYH SMALLINT,
YLD VARCHAR(10),
KDBH VARCHAR(12),
GLFL DOUBLE PRECISION,
ZJE DOUBLE PRECISION,
ZZSL DOUBLE PRECISION,
ZZSE DOUBLE PRECISION,
FKJ DOUBLE PRECISION,
GCBH VARCHAR(20),
CJMC VARCHAR(20),
WZXZ VARCHAR(10),
CGYM VARCHAR(8)
)
以下为源程序:
define window input from 8,15 to 17,65;
double;
shadow;
color scheme 5
activate window input
dimension bt(20)
*@ 5,8 say '不满两位补0'
*@ 3,8 say '汇总月份:' get mon;
pict "99";
size 1,2;
default ''
*read
use clmxyk
m.date=date
use clbmk
clea
@ 2,10 say '现 在 正 在 汇 总 '+str(month(m.date),2)+'月 数 据'
@ 4,14 say "..................."
copy to aa
use aa
@ 4,14 say "*"
appe from clmxyk
*dele for srj=0 .and. fcj=0
*pack
@ 4,col() say "*"
inde on bm to clin
@ 4,col() say "*"
total on bm to hzyb fields srl1,srl2,srl3,srl4,srl5,srl6,srl7,srl8,;
srj1,srj2,srj3,srj4,srj5,srj6,srj7,srj8,srd,srjs,yzf,zzse,rglfe,fcl1,fcl2,fcl3,fcl4,fcl5,;
fcj1,fcj2,fcj3,fcj4,fcj5,fcd,fcjs,glfe
@ 4,col() say "*"
use hzyb
repl all bh with substr(bm,1,2)
repl all srj with srj1+srj2+srj3+srj4+srj5+srj6+srj7+srj8
repl all srl with srl1+srl2+srl3+srl4+srl5+srl6+srl7+srl8
repl all fcj with fcj1+fcj2+fcj3+fcj4+fcj5
repl all fcl with fcl1+fcl2+fcl3+fcl4+fcl5
repl all fkj with srjs+zzse+rglfe+yzf,zje with glfe+fcjs
repl all qmsl with ncsl+srl-fcl,qmje with ncje+srj-fcj
@ 4,col() say "*"
inde on bh tag bh
total on bh to bk0
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdl
set rela to bh into bk0
for i=1 to 8
g=str(i,1)
repl all srj&g with bk0.srj&g
endfor
repl all srjs with bk0.srjs,yzf with bk0.yzf,zzse with bk0.zzse
repl all srd with bk0.srd,fcd with bk0.fcd,rglfe with bk0.rglfe
for i=1 to 5
g=str(i,1)
repl all fcj&g with bk0.fcj&g
endfor
repl all glfe with bk0.glfe,fcjs with bk0.fcjs
repl all srj1 with srj1+srj6
repl all srj6 with 0
repl all srj with srj1+srj2+srj3+srj4+srj5+srj6+srj7+srj8,;
fcj with fcj1+fcj2+fcj3+fcj4+fcj5
repl all fkj with srjs+yzf+rglfe+zzse,zje with glfe+fcjs
repl all ncje with bk0.ncje
repl all qmje with ncje+srj-fcj,date with date()
@ 4,col() say "*"
set rela off into bk0
close all data
&&& 汇总月库 &&&
use clmxyk
inde on bh to bh
total on bh to bk0 fields srl1,srl2,srl3,srl4,srl5,srl6,srl7,srl8,;
srj1,srj2,srj3,srj4,srj5,srj6,srj7,srj8,zzse,yzf,srjs,rglfe,srd,fcl1,fcl2,fcl3,fcl4,fcl5,;
fcj1,fcj2,fcj3,fcj4,fcj5,fcd,glfe,fcjs
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdly
set rela to bh into bk0
repl all srd with bk0.srd,fcd with bk0.fcd
for i=1 to 8
g=str(i,1)
repl all srj&g with bk0.srj&g
endfor
repl all srjs with bk0.srjs,yzf with bk0.yzf,zzse with bk0.zzse
repl all fcjs with bk0.fcjs,glfe with bk0.glfe,rglfe with bk0.rglfe
for i=1 to 5
g=str(i,1)
repl all fcj&g with bk0.fcj&g
endfor
repl all srj1 with srj1+srj6
repl all srj6 with 0
set rela off into bk0
sele 1
use clbmk order bh
total on bh to bk0 field qmje
use bk0
inde on bh to aa
sele 2
use clhzdly
set rela to bh into bk0
repl all srj1 with srj1+srj6
repl all srj6 with 0
repl all srj with srj1+srj2+srj3+srj4+srj5+srj6+srj7+srj8,;
fcj with fcj1+fcj2+fcj3+fcj4+fcj5
repl all fkj with zzse+srjs+rglfe+yzf,zje with glfe+fcjs
repl all qcje with bk0.qmje
repl all qmje with qcje+srj-fcj
@ 4,col() say "*"
set rela off into bk0
close all data
&&& 求月收/发项数 &&&
use clmxyk
copy to bb field bh,bm,srd,srj,fcd,fcj
use bb
inde on bm to clin
total on bm to aa
use aa
repl all for srj<>0 srd with 1
repl all for fcj<>0 fcd with 1
@ 4,col() say "*"
inde on bh to aa
total on bh to bk0
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdly
set rela to bh into bk0
repl all srd1 with bk0.srd,fcd1 with bk0.fcd
set rela off into bk0
close all data
@ 4,col() say "*"
&&& 求年收/发项数 &&&
use bb
appe from clmx
inde on bm to clin
total on bm to aa
use aa
repl all for srj<>0 srd with 1
repl all for fcj<>0 fcd with 1
@ 4,col() say "*"
inde on bh to aa
total on bh to bk0
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdl
set rela to bh into bk0
repl all srd1 with bk0.srd,fcd1 with bk0.fcd
set rela off into bk0
close all data
@ 4,col() say "*"
&&& 求期初/期末项数 &&&
use clbmk
copy to aa field bh,bm,dqsl,dqje,qmsl,qmje,ncsl,ncje
use aa
repl all bh with substr(bm,1,2),qmsl with 0,dqsl with 0,ncsl with 0
repl all for dqje<>0 dqsl with 1
repl all for qmje<>0 qmsl with 1
repl all for ncje<>0 ncsl with 1
@ 4,col() say "*"
inde on bh to aa
total on bh to bk0
@ 4,col() say "*"
use bk0
inde on bh to aa
sele 2
use clhzdly
set rela to bh into bk0
repl all qcd with bk0.qmsl,qmd with bk0.dqsl
use clhzdl
set rela to bh into bk0
repl all qcd with bk0.ncsl,qmd with bk0.dqsl
set rela off into bk0
@ 4,col() say "*"
close all data
&&& 生成查询库 &&&
use clhzdl
copy to clhz
copy to aa
use aa
repl all bb with '0'
inde on bb to aa
total on bb to cc
use cc
repl mc with "合 计",bh with ' '
use clhz
appe from cc
use clhzdly
copy to clhzy
copy to aa
use aa
repl all bb with '0'
inde on bb to aa
total on bb to cc
use cc
repl mc with "合 计",bh with ' '
use clhzy
appe from cc
?chr(7)
?chr(7)
clear
@ 4,15 say '汇 总 完 毕'
wait
use
clear windows
return