update 表 set 字段 = Replace(字段 ,“.SZ”,“”) from 表
别一条语句同样修改一下就可以

解决方案 »

  1.   

    update 表 set 字段 = Replace(字段 ,“.SZ”,“”) from 表 where substring(字段,1,1) = "0"
      

  2.   


    -- 1.把所有以0开头的6位数字的记录后面加上“.SZ”,如“000001”变为“000001.SZ”;
    update [表名] 
     set [代码]=[代码]+'.SZ'
     where left([代码],1)='0' and len([代码])=6-- 2.把所有以6开头的6位数字的记录后面加上“.SH”,如“600898”变为“600898.SH”.
    update [表名] 
     set [代码]=[代码]+'.SH'
     where left([代码],1)='6' and len([代码])=6
      

  3.   

    -- 1.把所有以0开头的6位数字的记录后面加上“.SZ”,如“000001”变为“000001.SZ”;
    update [表名] 
     set [代码]=[代码]+'.SZ'
     where left([代码],1)='0' and len([代码])=6
     
    -- 2.把所有以6开头的6位数字的记录后面加上“.SH”,如“600898”变为“600898.SH”.
    update [表名] 
     set [代码]=[代码]+'.SH'
     where left([代码],1)='6' and len([代码])=6