本帖最后由 wdzczy 于 2010-08-02 14:35:48 编辑

解决方案 »

  1.   

    Update Sheet1$ 
    set 身份证号=replace(身份证号,””,'')
     where 身份证号 LIKE '% %' 
      

  2.   

    Update Sheet1$  
    set 身份证号=replace(身份证号,' ','')
     where 身份证号 LIKE '% %' 
      

  3.   

    Update Sheet1$ set 身份证号=replace(身份证号,' ','') 
      

  4.   

    Update Sheet1$ set 身份证号=replace(身份证号,char(32),'') 
    where 身份证号 LIKE '%'+char(32)+'%' 
      

  5.   

    如果只是前后有空格,可以这样update tb set 身份证号=ltrim(rtrim(身份证号))
      

  6.   

    Update Sheet1$ set 身份证号=replace(身份证号,' ','') 
      

  7.   


    Update Sheet1$  
    set 身份证号=replace(身份证号,'','')
     where 身份证号 LIKE '% %' 执行成功,但是没有效果
      

  8.   

    哈哈 你的正确~Update Sheet1$ set 身份证号=replace(身份证号,' ','')
      

  9.   

    这个是有一个空格的 ' '你可以先select 身份证号,replace(身份证号,' ','')
    from table 看看这两列有区别吗?