Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tAS400Input data type mismatch

I have exception in component tAS400Input:
java.sql.SQLException: Data type mismatch. (For input string: "01/01/09")
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
at com.ibm.as400.access.SQLVarchar.getFloat(SQLVarchar.java:486)
at com.ibm.as400.access.AS400JDBCResultSet.getFloat(AS400JDBCResultSet.java:2869)
Thank you
Labels (4)
9 Replies
Anonymous
Not applicable
Author

Hello
java.sql.SQLException: Data type mismatch. (For input string: "01/01/09")

What's the data type of this column? int or Date? as the string "01/01/09" display, it should be Date type here.
Best regards
Shong
Anonymous
Not applicable
Author

The input type is integer and output type is date(dd/mm/yy)

Best regards,
dn
Anonymous
Not applicable
Author

Hello
As the error message shows, it is a string ""01/01/09" in the table, so you need set the input type as string and convert string type to Date or set it as Date type.
Best regards
Shong
Anonymous
Not applicable
Author

Hello,
The input type is string and output type is date. In tMap I used TalendDate.parseDate("dd/mm/yy",row13.H_TRDJ).
I have exception on component tAS400Input Data type mismatch. (For input string: "01/01/09") .

Best regards.
dn
0683p000009MPcz.png
Anonymous
Not applicable
Author

Hello
at com.ibm.as400.access.SQLVarchar.getFloat(SQLVarchar.java:486)
at com.ibm.as400.access.AS400JDBCResultSet.getFloat(AS400JDBCResultSet.java:2869)

Can you upload a screenshot of schema of tAS400Input? From the error message, I see the data type is float.
Best regards
Shong
Anonymous
Not applicable
Author

Hello,
I fix this problem I don't have anymore this error but when I check what is date on database isn't the format dd/mm/yy.
Best regards,
dn
Anonymous
Not applicable
Author

Hello
but when I check what is date on database isn't the format dd/mm/yy.

Do you point to the target db? Which type of DB?
Best regards
Shong
Anonymous
Not applicable
Author

Hello Shong,
The name of field is TRDJ and for output I put date which format dd/mm/yy like you can see in the previous image.
The database is Microsoft SQL i have the same field TRDJ and is datetime(see image 2) but when see what is data on db i see yyyy-mm-dd 00:00:00.000(see image 1)
Best regards,
dn
Anonymous
Not applicable
Author

Hello
It is a display format problem in Microsoft SQL tool, yyyy-mm-dd 00:00:00.000 is the default format of datetime type in Microsoft SQL. If you want to see format dd/mm/yy, you should use convert function in Microsoft SQL tool.
For example:
select convert(varchar(12),TRDJ,3) from tableName;
Please search ms sql datetime format on google.
Best regards
Shong