收集的一些常用的VF命令

1.工作中用到的一些:

appe from ../sjshb

zap

repl wttdbz with '1' all

open sjswt share

use

brow

repl wtzqdm with 000001 for wtywbz='0C'

brow for left(gfywlb,1) != 'A'

modi修改DBF表结构

 

2.取得日期:
repl ls with substr(certid,11,4) for len(alltrim(certid))=18
brow
repl ls with substr(certid,9,4) for len(alltrim(certid))=15
modi stru
repl all ls1 with left(ls,2)+'月'+right(ls,2)+'日'


case 语句:
select b.servnumber,
case when a.privid=75900000062422 then ''
when a.privid=75900000062423 then ''
when a.privid=75900000062424 then ''
when a.privid=75900000062425 then ''
end
from zjzw.cm_Subs_Privilege a join zjzw.cm_subs_subscriber b on a.subsid=b.subsid
where a.privid in (75900000062422,75900000062423,75900000062424,75900000062425)


3.压缩语句:
delete for substr(dhhm,1,1)!='1'

4.向表中加入记录程序:
set safe off
sele a
use ls
zap
pack
index on dhhm to s
sele b
use bb_hf_610
go top
do while .not. eof()
   aa=dhhm
   sele a
   seek aa
   if found()
      repl hf_610 with b->to_hf
   else
      appe blank
      repl dhhm with aa
      repl hf_610 with b->to_hf
   endif
   sele b
   skip

enddo

5.显示目录:
dir.*或dir
case等效语句:
repla all stopkey with ''for stopkey='00020000'
repla all stopkey with ''for stopkey='00002000'
repla all stopkey with ''for stopkey='20000000'
repla all stopkey with ''for stopkey='02000000'
repla all stopkey with ''for stopkey='00200000'

6.求和过程中消除零情况处理;
iif(isnull(a.amt),0,a.amt);

7.多表连接求和(同一号码):
select a.dhhm,iif(isnull(a.to_hf ),0,a.to_hf )+b.to_hf+c.to_hf+d.to_hf+e.to_hf+f.to_hf  as avgconsume ;
FRom bb_hf_703_bk a left join bb_hf_702_bk b on a.dhhm=b.dhhm left join bb_hf_701_bk c on a.dhhm=c.dhhm ;
left join bb_hf_612_bk d on a.dhhm=d.dhhm left join bb_hf_611 e on a.dhhm=e.dhhm left join bb_hf_610 f on a.dhhm=f.dhhm
8. dbf文件转换成txt文件:
appe from filename.txt sdf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值