954,113 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Warning Code : 1265

I am receiving MySQL error 1265 when I try to insert records into a table and after googling this error I am no closer to understanding the problem.
Here is the error message that is returned:
Warning Code : 1265
Data truncated for column 'DATE_FIELD' at row 1

Here is the table definition:

CREATE TABLE  `test`.`TIME_TABLE` (
`RECORD_NUM` INT( 6 ) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT  'Number of Records',
`DATE_FIELD` DATE NOT NULL COMMENT  'Date of the event',
`DESCRIPTION` VARCHAR( 1000 ) NOT NULL COMMENT  'Detail of the event'
) ENGINE = MYISAM COMMENT =  'This day in history'

Here is a typical insert:
INSERT INTO TIME_TABLE ( DATE_FIELD, DESCRIPTION ) VALUES ('28, October    1971' , 'Great Britain launched Prospero, the first of four X-3 satellites.');


When inspecting the table the DATE-FIELD is set to ‘0000-00-00’

rouse
Junior Poster
114 posts since Dec 2007
Reputation Points: 10
Solved Threads: 1
 

You can insert a datefield as '1971-10-28'. The data you are trying to insert does not fit in the date column.

pritaeas
Posting Expert
Moderator
5,445 posts since Jul 2006
Reputation Points: 653
Solved Threads: 872
 

OK and Thanks!

rouse
Junior Poster
114 posts since Dec 2007
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You