Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

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

jkauffman28's profile image jkauffman28 posted 6 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 6 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 4 years ago Permalink
Maybe an option for what to replace to NULL would be a nice idea like this:

==options==

[ ] create NULL from string ______

Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ansgar's profile image ansgar posted 4 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 4 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 4 years ago Permalink
How to insert NULL's from certain strings in the LOAD DATA command?
nobswolf's profile image nobswolf posted 4 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 :)
harishashim's profile image harishashim posted 11 months 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.