I found one solution that is out of the box and can be easily implemented. The solution is very similar to SET ANSI_WARNING OFF in MS SQL Server.
In MySQL, you first need to check if the configuration for "sql_mode" is set using the following command:
SHOW VARIABLES LIKE 'sql_mode';
OR use below:
SELECT @@GLOBAL.sql_mode;
In CSV there can be the following sets of values.
ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION
Based on your mistake, you can delete the settings and reset them with the following command:
SET GLOBAL sql_mode = 'ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
Use the above command to reset it. This solved a problem like the "Truncated invalid INTEGER value" in my case. I hope this should work from other users who encounter this problem.
See here for more details on this sql_mode.
Hope this will use the full!
Bhavesh harsora
source share