November 7, 2022 at 7:24 am
you now really on to the realm of MYSQL forums - while some here may be able to help this is not the best forum for it.
regarding the integer display warning - see https://stackoverflow.com/questions/58938358/mysql-warning-1681-integer-display-width-is-deprecated
it is just a warning and can be ignored.
the other is an error and there may be ways of fixing it - it would require a change on the load command for sure. have a look at https://www.percona.com/blog/2016/07/05/mysql-5-7-utf8mb4-and-the-load-data-infile/ and https://stackoverflow.com/questions/43408012/mysql-invalid-utf8-character-string-when-importing-csv-table
solution will depend on what your input data charset is.
with regards to converting the scripts to be correct its not as complicated as it seems as the change should be the same in all of the load commands.
And if the table definitions/selects themselves need to be changed (for example if you have sysname columns) then again this is not that hard to do within a single script.
November 7, 2022 at 10:38 am
Thank you for your help. I have tested "LOAD DATA INFILE" from csv.
The main problem is CSV itself generating wrong data.
Ex: if I have columns like this, value is loaded differently in each column. Some of CreatedDate value is loade into CreatedBy etc.
Location_ID -bigint
Location -nvarchar
SetAsDefault -bit
CreatedBy -nvarchar
CreatedDate -datetime
Just noticed it is because of "," ex: - Irvington, NJ Office
November 7, 2022 at 12:04 pm
yes - that is one of the pains of using the files - on the cases where you have values on your tables with the delimiter you use you need to enclose those fields with double quotes - and if there is a double quote within the contents it needs to be escaped - similar for the delimiter itself I think. (not enough knowledge here as I don't use mysql)
the db to db option (the other option on the wizard) is likely to bypass this issue - but the query it generates may still need to be changed in some cases.
Viewing 3 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply