DB2- How to check if varchar field value has integers

后端 未结 7 891
借酒劲吻你
借酒劲吻你 2020-12-10 02:58

Is there an inbuilt DB2 function or any query to check if the character i have is a number? (I cannot use user defined functions)

7条回答
  •  一生所求
    2020-12-10 03:48

    Use ASCII function to get character value and compare that it is between 48 '0' and 57 '9'

    ASCII Table

    ASCII Function Returns the ASCII code value of the leftmost character of the argument as an integer.

提交回复
热议问题