Oracle “Invalid Number” caused by to_char function

后端 未结 1 1629
感情败类
感情败类 2021-01-27 17:30

I have the following SQL query which is looking for duplicate values in a table (two values being null must be classed as a duplicate, hence the use of nvl):

sel         


        
相关标签:
1条回答
  • 2021-01-27 18:12

    To_Char expects to receive a number as its argument by default. If it receives a character string then it will try to implictly convert the string to a number, and that will raise this error message if the string cannot be converted.

    If the column is of a character type, do not try to convert it to a string.

    0 讨论(0)
提交回复
热议问题