Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am reading file input and insert into DB2 database table. One scenario i got input is lie below and received error in talend job tDBOutput component.
DB2 SQL error: SQLCODE: -302, SQLSTATE: 22001, SQLERRMC: null
[ERROR]: Project.X_l_subjob_0_1.X_L_Subjob - tDBOutput_1 - DB2 SQL error: SQLCODE: -302, SQLSTATE: 22001, SQLERRMC: null
DB2 table column datatype - char(20)
Input Type - String
tDBOutput - Type - String , DB Type - varchar
File input value - 00625一1020504人0325
Hi @not specified not specified
It seems that:
trim your string, or increase the size of column
another point to have in mind: values in a DB2 char() will be PADDED with spaces to the full length, if they are shorter than 20 chars in length
Hi,
I am already doing Stringhandling.left(InputValue,20)
Main problem is the special characters in input value, looks some messy values. It is not working with varchar in tDBOutput component.
tDBOutput - Type - String , DB Type - varchar
File input value - 00625一1020504人0325
tLogRow output after trim -> 00625Àž€1020504À
Hi
What encoding do you use to read the value from input file? By default, it is 'ISO-8859-15', have a try to change it to UTF-8 or other type that matches the string encoding. This properties is located in the advanced settings panel of tFileInputXXX component.
Regards
Shong