ISNUMERIC('07213E71') = True?

后端 未结 5 2088
暖寄归人
暖寄归人 2020-12-17 16:59

SQL is detecting that the following string ISNUMERIC:

\'07213E71\'

I believe this is because the \'E\' is being classed as a mathmatical symbol.

5条回答
  •  攒了一身酷
    2020-12-17 17:50

    07213E71 is a floating number 7213 with 71 zeros

    You can use this ISNUMERIC(myValue + '.0e0') to test for whole integers. Slightly cryptic but works.

    Another test is the double negative myValue NOT LIKE '%[^0-9]%' which allows only digits 0 to 9.

    ISNUMERIC has other issues in that these all return 1: +, -,

提交回复
热议问题