[IBM][CLI Driver][DB2] SQL0181N The String Representation of a Datetime Aalue is out of Range. SQLSTATE=22007 {22007,NativeErr = -181} Using Dg4ODBC with DB2

(Doc ID 1670754.1)

Last updated on JANUARY 19, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Information in this document applies to any platform.

Symptoms

Using Database Gateway for ODBC (DG4ODBC) 11.2.0.4 to select from DB2 a query with a where condition on a date column fails with the error -

[IBM][CLI Driver][DB2] SQL0181N  The string representation of a datetime value is out of range.  SQLSTATE=22007
{22007,NativeErr = -181}

 e.g.

SELECT COL1, COL2

FROM DB2TABLE@DBLINK

WHERE COL3 >'2005-01-01'

Changes

11.2.0.3 DG4ODBC was upgraded to 11.2.0.4

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms