update Userinfo set huiyuan='000000' where  Convert(bigint,accounts)<=88800011 and Convert(bigint,accounts>=88800010
accounts 是char 型

解决方案 »

  1.   

    只要accounts字段没有非法字符就是对的
      

  2.   

    --tryupdate Userinfo set huiyuan='000000' where  
    Convert(bigint,rtrim(ltrim(accounts))) between 88800010 and 88800011
      

  3.   

    accounts中必须是纯数字的字符串.
      

  4.   

    update Userinfo set huiyuan='000000' where  isnull(accounts,'')between '88800011'  and '88800010'
    不知道这样会不会查询快点,请楼下顺便讨论一下
      

  5.   

    update Userinfo set huiyuan='000000' where  isnull(accounts,'')between '88800010'  and '88800011'刚才反过来了