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.

Fix warning with date column

BigMat's profile image BigMat posted 1 month ago in Import/Export Permalink

Hi, My "contact" table has a non-required BIRTH_DATE field. My contact CSV file sometimes lacks a BIRTH_DATE. Until last week week, we put a "NULL" string in the birthdate field in the CSV file. this has worked fine with MYSQL using MyPHPAdmin and MySQL workbench.

I'm now requested to use mariaDB and HeidiSQL.

But I get warnings about the BIRTH_DATE.

Example of a CSV file:

"Id"|"First Name"|"Last Name"|"Date of Birth"

"1"|"John1"|"Peter"|"1978-10-15"

"2"|"John2"|"Peter"|""

"3"|"John3"|"Peter"|"NULL"

"4"|"John4"|"Peter"|"0000-00-00"

All records are loaded successfully but I get warnings for the last 3 records: Warning: Data truncated for column 'BIRTH_DATE' at row 2 (and 3 and 4)

When I query the table, column 'BIRTH_DATE' shows '0000-00-00' for contacts without a value.

What should I change in the CSV file to avoid these warnings? I tried to put string: 0000-00-00 for contact #4 but HeidiSQL is still unhappy with my CSV file.

I used other tools like MyPHPAdmin and MySQL workbench and they don't throw any warning when loading the very same CSV file.

I want to keep warnings, in general, so I didn't uncheck the "Keep showing this dialog". but only if they are legitimate. This one doesn't warn me of anything and is unhelpful.

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




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.