MySQL Forums
Forum List  »  Newbie

Re: How do I load a CSV that has a column that is entirely empty?
Posted by: Peter Brawley
Date: January 06, 2022 12:14PM

Your CSV file has empty strings "" for an Int column, which will not accept such a string value.

One fix would be to correct the spreadsheet, substituting |N for the empty space.

Or, see the Load Data Infile manual page https://dev.mysql.com/doc/refman/8.0/en/load-data.html under "Input Preprocessing" re the syntax for using user variables and SET syntax to hold such values and changing them row by row.

Options: ReplyQuote


Subject
Written By
Posted
Re: How do I load a CSV that has a column that is entirely empty?
January 06, 2022 12:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.