Running MySql on a ML350 G5 HP server. The operating system is Small Business Server 2008
I am trying to import a csv file into a table. I am a MySql novice.
The table structure is attached. See file tblpivottxt structure.pdf
The contents of the csv file are below:
,Yest Close,Yest High,
& Poors 500,2075.14,2066.53,2071.1
I used the commands below to try to import the data.
Mysql> LOAD DATA INFILE 'd:/investing – Programming/MySql/TxtData/
> INTO TABLE pivot.tblpivottxt
> FIELDS TERMINATED BY ','
> LINES TERMINATED BY '\n'
> IGNORE 1 ROWS;
Error 1292 <22007> Incorrect data value: '10/26/2015' for column 'DateEntered' at row 1
As you can see there is an error.
In the table tblpivottxt, the DateEntered field is defined as date
The date in the csv file is in mm/dd/yyyy format. My guess is the date format must be changed.
If I am correct, what commands would you use to change the date so it will successfully import?
Remember, I am not an expert so please provide a detailed answer.
May be you see other problems? If so, please suggest solutions.