-、修改某一表中的字段值为38个字符;
update f:\test\abc.dbf set address = left (address,38)
二、工号字段原先录入的时候有些不足六位,请检查出不足六位的工号,并在其前面加零使其达到六位;
update f:\test\abc.dbf set gh = right(replicate('0',6) + alltrim(gh) ,6) where len(alltrim(gh)) < 6
或者用如下语句:
update f:\test\abc.dbf set gh = right('000000'+alltrim(gh),6) where len(alltrim(gh)) < 6
三、如果将某一个表存为EXCEL格式,并且设置A、B列内容为字符型,可用如下语句;
eole.Columns ("A:B").select
eole.Selection.NumberFormatLocal="@"
阅读(1519) | 评论(0) | 转发(0) |