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
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.