This is a discussion on can't import TIME type w/mysqlimport within the MySQL forums, part of the Database Server Software category; --> Hi - I'm using server 5.0.19 on kernel 2.6.9.11. I was trying to use mysqlimport to import from a ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi - I'm using server 5.0.19 on kernel 2.6.9.11. I was trying to use mysqlimport to import from a local file into a table. It kept barfing on a time field. So just to isolate the problem, i reformatted the file to contain only records as follows: 2006-03-13,09:13:26 2006-03-13,10:16:02 when i select * from the table i can see that only the dates were imported, but not the time. this is the SQL command I used to create the table: CREATE TABLE datetime (date DATE, time TIME, INDEX(date), INDEX(time)); any suggestions? |
| ||||
| <cartine@gmail.com> wrote in message news:1142522190.019797.284630@i39g2000cwa.googlegr oups.com... > I was trying to use mysqlimport to import from a local file into a > table. It kept barfing on a time field. So just to isolate the problem, > i reformatted the file to contain only records as follows: > > 2006-03-13,09:13:26 > 2006-03-13,10:16:02 This worked for me: mysqlimport -u root -p --fields-terminated-by=, -v test datetime.txt This was using MySQL 5.0.18 on Windows XP Pro, executing mysqlimport from a DOS command shell. Can you be more specific regarding the failure? Was there any error message, or did it just silently fail to insert some values? Is your file in DOS format (newlines terminated by \r\n)? Regards, Bill K. |