SQL IsNumeric not working

前端 未结 11 897
迷失自我
迷失自我 2021-01-02 19:47

The reserve column is a varchar, to perform sums on it I want to cast it to a deciaml. But the SQL below gives me an error

select
cast(Reserve as decimal)
fr         


        
11条回答
  •  抹茶落季
    2021-01-02 20:12

    isnumeric is not 100% reliable in SQL - see this question Why does ISNUMERIC('.') return 1?

    I would guess that you have value in the reserve column that passes the isnumeric test but will not cast to decimal.

提交回复
热议问题