DB2 - Problem description
Problem IT37132 | Status: Closed |
SQL0180N IS RETURNED WHEN TRY TO INSERT ODBC FORMAT TIMESTAMP. | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - DB2 | |
Problem description: | |
Our docs claims that ODBC format timestamp can be used as an input. Moreover, different flavours of ODBC timestamp that use "T" (yyyy-MM-ddThh:mm:ss) or "-" (yyyy-MM-dd-hh:mm:ss) as delimiter to separate date and time are equivalent to ODBC format that use space/blank to separate date and time (yyyy-MM-dd hh:mm:ss) For example, '2018-03-22 08:30:58.7', '2018-03-22-08:30:58.7', and '2018-03-22T08:30:58.7' are all equivalent. more info: https://www.ibm.com/docs/en/db2/11.5?topic=list-datetime-values However, SQL0180N is returned when tried to insert timestamp using formats that use "T" and "-" as delimiter $ db2 "create table t1(i int, t timestamp)" $ db2 "insert into t1 values(1, '2018-03-22-08.30.58.7')" DB20000I The SQL command completed successfully $ db2 "insert into t1 values(2, '2018-03-22 08:30:58.7')" DB20000I The SQL command completed successfully. $ db2 "insert into t1 values(3, '2018-03-22-08:30:58.7')" DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0180N The syntax of the string representation of a datetime value is incorrect. SQLSTATE=22007 $ db2 "insert into t1 values(4, '2018-03-22T08:30:58.7')" DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0180N The syntax of the string representation of a datetime value is incorrect. SQLSTATE=22007 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * all * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to 11.1.4.7 * **************************************************************** | |
Local Fix: | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * all * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to 11.1.4.7 * **************************************************************** | |
Comment | |
Upgrade to 11.1.4.7 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 04.06.2021 17.04.2022 17.04.2022 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |