944,050 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Marked Solved
  • Views: 2259
  • MySQL RSS
Oct 28th, 2009
0

Warning Code : 1265

Expand Post »
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:
MySQL Syntax (Toggle Plain Text)
  1. CREATE TABLE `test`.`TIME_TABLE` (
  2. `RECORD_NUM` INT( 6 ) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'Number of Records',
  3. `DATE_FIELD` DATE NOT NULL COMMENT 'Date of the event',
  4. `DESCRIPTION` VARCHAR( 1000 ) NOT NULL COMMENT 'Detail of the event'
  5. ) ENGINE = MYISAM COMMENT = 'This day in history'
  6.  
  7. Here IS a typical INSERT:
MySQL Syntax (Toggle Plain Text)
  1. 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’
Similar Threads
Reputation Points: 10
Solved Threads: 1
Junior Poster
rouse is offline Offline
111 posts
since Dec 2007
Oct 29th, 2009
0
Re: Warning Code : 1265
You can insert a datefield as '1971-10-28'. The data you are trying to insert does not fit in the date column.
Sponsor
Featured Poster
Reputation Points: 556
Solved Threads: 732
Bite my shiny metal ass!
pritaeas is offline Offline
4,196 posts
since Jul 2006
Oct 29th, 2009
0
Re: Warning Code : 1265
OK and Thanks!
Reputation Points: 10
Solved Threads: 1
Junior Poster
rouse is offline Offline
111 posts
since Dec 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: problem with wamp...
Next Thread in MySQL Forum Timeline: SQL to return two of each value from table?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC