select cast(ifnum as int) num from tablename where ISNUMERIC(ifnum)=1

解决方案 »

  1.   

    if isnumeric(@str)=1  --isnumeric判断是否为数字
       set @number=convert(decimal(12,2),@str)   --convert转换
      

  2.   

    select convert(decimal(12,2),ifnum) isnum from tablename where ISNUMERIC(ifnum)=1这会好点~~~:)ifnum  ---是你要判断的字段
      

  3.   

    isnumeric(參數)如果是數字,結果為1,否則為0
    convert(要轉換的類型,要轉換的值,格式)第二個參數可以不管