Page 1 of 1

Data truncation is happening

Posted: Thu May 19, 2011 10:48 pm
by deepa_shenoy
Hi,

I am unable to view data from the DB2 source stage. It is throwing the below error.

DB2_COLR: The size specified for column 'COLR_N' (16) is less than that of the source table column (50);data truncation may result.
DB2_COLR: The size specified for column 'CRTE_TS' (16) is less than that of the source table column (26);data truncation may result.
DB2_COLR: SQLExecDirect: DB2 error info message '[IBM][CLI Driver] CLI0113E SQLSTATE 22007: An invalid datetime format was detected; that is, an invalid string representation or value was specified. SQLSTATE=22007'.
DSTAGE-DB2CLI-0026`:`SQLFetch: Error retrieving results from server.

The data type in the source, and the metadata given in the DB2 stage are exactly the same. What could be the issue?

Posted: Fri May 20, 2011 12:51 am
by premupdate
Hi,

Enable the environmental variable OSH_PRINT_SCHEMA and compare the metadata.

Posted: Fri May 20, 2011 5:14 am
by deepa_shenoy
No that did not help.

Although, if you arrange the columns in the Custom SQL same as the order in the Metadata, that works!!

A silly solution, but a solution nonetheless :)

Posted: Fri May 20, 2011 6:21 am
by chulett
Silly solution? More like an absolute requirement.

Posted: Fri May 20, 2011 6:34 am
by deepa_shenoy
Is it? Oh my mistake then. I did not know that.

In DS 8 there was no such requirement. Still getting used to DS 8.5.

Posted: Fri May 20, 2011 6:41 am
by chulett
Always been a requirement, as far as I recall. [shrug]