-1213 A character to numeric conversion process failed.
A character value is being converted to numeric form for storage in a numeric column or variable.
However, the character string cannot be interpreted as a number. It contains some characters
other than white space, digits, a sign, a decimal, or the letter e; or the parts are in the wrong order,
so the number cannot be deciphered.
Your query is causing Informix to attempt to explicitly or implicitly cast
non-numeric data in a character column to a number.
You have a table named test1 that has a character column named phone_number.
There are three rows in the table and phone_number has these values:
You run this select:
select * from test1 where phone_number = 1234567890
There are no quotes around 1234567890 so this value is treated as an integer.
phone_number is a character column so Informix implicitly casts the character
column to integer. If there are no non-numeric characters in the data field
then this will work. There is a non-numeric character in the first row's data
field so when Informix tries to cast the A as an integer it returns a -1213
Put quotes around the value you are comparing to the character column.
Remove non-numeric data from the character column.