收集的一些常用的VF命令

    技术2022-05-12  2

    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))=18browrepl ls with substr(certid,9,4) for len(alltrim(certid))=15modi strurepl 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 ''endfrom zjzw.cm_Subs_Privilege a join zjzw.cm_subs_subscriber b on a.subsid=b.subsidwhere a.privid in (75900000062422,75900000062423,75900000062424,75900000062425)

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

    4.向表中加入记录程序:set safe offsele ause lszappackindex on dhhm to ssele buse bb_hf_610go topdo 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.*或dircase等效语句: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.dhhm8. dbf文件转换成txt文件:appe from filename.txt sdf


    最新回复(0)