Null value for CSV upload into a MYQL date/time field with a default of NULL

[expired user #7983]'s profile image [expired user #7983] posted 10 years ago in Import/Export Permalink
I'm trying to replace blanks in a datetime field in an excel csvv that is inserted in a MySQL database. I've tried all values found at http://staraphd.blogspot.com/2009/09/import-null-values-into-mysql-via.html to no avail.

What am I missing?
ansgar's profile image ansgar posted 10 years ago Permalink
I think Heidi inserts NULLs for values which have a "NULL" string in it. But only for the "Client parses file contents" method.
nobswolf's profile image nobswolf posted 9 years ago Permalink
Maybe an option for what to replace to NULL would be a nice idea like this:

==options==

[ ] create NULL from string ______

ansgar's profile image ansgar posted 9 years ago Permalink
Are we talking about the LOAD DATA command (server parsing) or the client parsing method in the import dialog?
nobswolf's profile image nobswolf posted 9 years ago Permalink
From a user's perspective I'd say this should be transparent.

So this feature should be possible in both technics. How this is implemented on the SQL level is a different topic of course.
ansgar's profile image ansgar posted 9 years ago Permalink
How to insert NULL's from certain strings in the LOAD DATA command?
nobswolf's profile image nobswolf posted 9 years ago Permalink
I will look into it... I think it is possible with some of the "escape"-parameters... It's been a while since I was into that low level console stuff :)
[expired user #11933]'s profile image [expired user #11933] posted 5 years ago Permalink

Sorry to resurrect this topic. I just post a new topic saying that \N is not translated to NULL when exporting and importing CSV. Thanks!

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