distal-attribute
distal-attribute
distal-attribute
distal-attribute

How do I import NULL

User, date Message
Written by Chillbo
6 years ago
Category: Import/Export
4 posts since Mon, 25 Jun 07
I'm trying to import a data set from a CSV file. This works correctly except that blank values don't get inserted as NULL. I have to manually set NULL (Shift+Ctrl+N).

Do I need to set a special character in the CSV or am I missing something?
Written by ansgar
6 years ago
4940 posts since Fri, 07 Apr 06
An empty value is not a NULL value, it's just an empty string, just like it gets imported. There is no way to detect a NULL value in a CSV file.
Written by Chillbo
6 years ago
4 posts since Mon, 25 Jun 07
OK - thanks for the help. I'll look in to a CSV to SQL conversion to see if I can do it that way (unless there is a better method?).
Written by ansgar
6 years ago
4940 posts since Fri, 07 Apr 06
I guess if you do not find something related in the LOAD DATA documentation on www.mysql.com the chance is very low that somebody can fix it for you.
Written by Chillbo
6 years ago
4 posts since Mon, 25 Jun 07
Thanks anse - this is exactly what I needed:
http://dev.mysql.com/doc/refman/5.0/en/load-data.html
 

Please login to leave a reply, or register at first.