Informix Error -1349: Character to numeric conversion error.
Cause and resolution
Character to numeric conversion error.
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 else the parts are in the wrong order so that the number cannot be deciphered.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1349 fires when a character value is being converted to numeric form for storage in a numeric column or variable, but the character string can't be interpreted as a number — per the official guidance, this is a straightforward parse failure.
- The character string containing non-numeric characters, per the official guidance — the direct, common cause.
- The character string improperly formatted for a number (e.g. multiple decimal points, stray whitespace in the wrong place), per the official guidance's framing.
Solutions / Resolution
- Validate the character string represents a genuinely parseable number before the conversion is attempted.
- Correct the source of the malformed string, whether it's user input, a file import, or a computed value.
Examples
An unparseable character value
DEFINE v_amount DECIMAL(10,2);
LET v_amount = "12.34.56";
-- -1349: "12.34.56" isn't a valid number (two decimal points)
Corrected
LET v_amount = "12.34";
Diagnostic Checks
- Inspect the exact character string being converted, checking for non-numeric characters or malformed number syntax.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -1349 in this set yet.
A character string couldn't be parsed as a number — inspect the exact string for non-numeric characters or malformed syntax.