MySQL Forums
Forum List  »  Newbie

Loading an .sql file into a db failes on dummy dates
Posted by: Jack Walter
Date: September 02, 2008 06:56PM

Hi,

using 5.0.51b MySQL Community Edition (GPL).

C:\xampplite\mysql\bin>mysql.exe --user=cruise_db_user --password cruise_db < cruise_db.sql
Enter password: ***************
ERROR 1292 (22007) at line 257: Incorrect date value: '0000-00-00' for column 'reservation_cabin_booked_on' at row 1

If I do the same manually:

C:\xampplite\mysql\bin>mysql.exe --user=cruise_db_user --password cruise_db
Enter password: ***************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.51b-community MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> INSERT INTO `reservation` VALUES (1,0,1,'0000-00-00','0000-00-00','125712
92','','','','','0000-00-00','','','0000-00-00','0000-00-00','','','','0000-00-0
0','0000-00-00','','','','','','','','0000-00-00','','','0000-00-00','0000-00-00
','','','','0000-00-00','0000-00-00','','','','',1,1,1);
Query OK, 1 row affected (0.03 sec)

mysql>


everything is fine... How do I have to format these dummy dates in the .sql file that mysql accepts them?

Tia,
Jack

Options: ReplyQuote


Subject
Written By
Posted
Loading an .sql file into a db failes on dummy dates
September 02, 2008 06:56PM


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.