Warning Code : 1265

Thread Solved

Join Date: Dec 2007
Posts: 51
Reputation: rouse is an unknown quantity at this point 
Solved Threads: 1
rouse rouse is offline Offline
Junior Poster in Training

Warning Code : 1265

 
0
  #1
28 Days Ago
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:
  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:
  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’
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 811
Reputation: pritaeas is on a distinguished road 
Solved Threads: 132
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark
 
0
  #2
27 Days Ago
You can insert a datefield as '1971-10-28'. The data you are trying to insert does not fit in the date column.
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 51
Reputation: rouse is an unknown quantity at this point 
Solved Threads: 1
rouse rouse is offline Offline
Junior Poster in Training
 
0
  #3
27 Days Ago
OK and Thanks!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC