Symptom
- An issue arises when trying to convert a string in a column to a datetime value in a table of SAP IQ. (Other types of value will have this same issue, example: select cast('20200102030405' as datetime); );
- Could not execute the statement.
Column 'a' not found
SQLCODE=-143, ODBC 3 State="42S22"
Line 1, column 1 - The problem also occurs when adding million seconds or microseconds to the string. (Example: select cast('20200102030405111222' as datetime); );
- There was an error reading the results of the SQL statement.
The displayed results may be incorrect or incomplete.
Cannot convert '20200102030405111222' to timestamp
SQLCODE=-157, ODBC 3 State="07006"
Line 1, column 1
Read more...
Environment
Sybase IQ
Product
SAP IQ all versions
Keywords
SAP IQ, string to datetime, cast, SQLA, IQ engine, constant expression, table expression, fractional digits, column, type. , KBA , BC-SYB-IQ , Sybase IQ , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.