回复 楼主 jianjian053
没有样本数据,我只是把你程序中的hj和tchj改成7位长,2位小数(去除2位小数和1位小数点,整数部分只有4位,不够的话,可以再扩),其余的没变,你运行一下试试吧。
cd\tc
clea
close all
set safe off
km=spac(2)
set colo to
6+/g
@4,40 say '职工统筹对比程序' font '宋体',30
do whil .t.
@12,10 say '请输入工资数据库月份(如01):'
font '楷体',16
get km font '楷体',18
read
if .not.file("zg"+"&km"+".dbf")
wait '无此数据库,重新输入!'
loop
@10,40 clea
else
exit
endi
endd
use zg&km
copy to zg
use zg
alte tabl zg add colu hj n(7,2) null
repl all hj with ylkj+ylbxkj+sybxkj
use tc&km
copy to tc
use tc
dele all for dwbh<>[004]
pack
alte tabl tc add colu tchj n(7,2) null
repl all tchj with yl+yil+sy
use
sele zg.gzdw,zg.ldhth,zg.xm,zg.yfgz,zg.hj,tc.dwbh,tc.tchj from zg,tc;
wher (zg.ldhth=tc.ldhth and zg.hj<>tc.tchj) into tabl xy1
sele zg.gzdw,zg.ldhth,zg.xm,zg.hj from zg;
wher zg.ldhth not in (sele tc.ldhth from tc) into tabl xy2
sele tc.dwbh,tc.ldhth,tc.xm,tc.tchj from tc;
wher tc.ldhth not in (sele zg.ldhth from zg) into tabl xy3
clos all
use
xy1
*dele all for yfgz<=300
pack
brow titl "合同号一样,统筹扣款不等"
copy to xya&km
copy to xya&km xl5
use
xy2
*dele all for yfgz<=300
pack
brow titl "工资库有,统筹库没有"
copy to xyb&km xl5
use
xy3
brow titl "统筹库有,工资库没有"
*copy to "C:\Documents and Settings\zjl\桌面\xyc&km" xl5
copy to xyc&km xl5
clos all
set safe on
dele file tc.dbf
dele file zg.dbf
dele file xy?.dbf
dele file *.bak
return
[
本帖最后由 沙枣 于 2015-8-26 10:27 编辑 ]