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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data Truncated Error During Insert

I have a MySQL DB table with a variety of data types, but I am having trouble in particular with currency. I have tried changing the data type at the DB level and in Talend scripting to Float, Int, Decimal and most recently, Double. All data types have produced errors. Double is producing a "Data truncated for column 'Charges' at row 1".
What is the best data type to use for currency (need for sorting) and how can I get talend to insert the data?
Thanks
Jeff
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi,
We have designed a demo job, you can take it into consideration. We set the data type of currency as "String" . see the pic to get the details.

Best Regards
Sabrina
Anonymous
Not applicable
Author

String works for the insert, but if you intend to sort your results by currency at the application side, it will sort as:
0.67
1.24
10.23
107.76
2.54
20.45
200.45
3.76
and on and on. Setting as an integer, float, double, decimal will allow sorting by true numeric value.
Anonymous
Not applicable
Author

Hi,
Set the data type as Float and give a length to it.
What is the best data type to use for currency (need for sorting)

See pics
Best Regards
Sabrina