TRY:select * from dwpdb where convert(int,right(rtrim(fsf),charindex(',',fsf)-1))>=20

解决方案 »

  1.   

    我想这和你记录的条数没有关系,可能是因为你的第三条记录的数据是一位数(即0-9)这样子,在用convert时会报错,但是如果将该数据改为01-09就没问题了
      

  2.   

    select * from dwpdb where convert(int,right(rtrim(fsf),charindex(',',fsf)-1))>=20这样前两边两条好的数据也没有了。
      

  3.   

    这个表里有不规则的数据像,,,,,,,,,这样的,所以,怎么去掉呢,而又可以用conver这个函数。
      

  4.   

    TRY:select * from dwpdb where convert(int,right(rtrim(Fsf),charindex(',',reverse(Fsf))-1))>=20