MySQL Forums
Forum List  »  Microsoft Access

import of data from txt files
Posted by: Rodrigo Soria
Date: June 05, 2011 12:11PM

Hi all,
MySQL is quite new for me. therefore, I think that this question may be quite basic for most of you. However, I think it is not well explined anywhere.
I have just downloaded the MySQL recently The MySQL command line server doesn't work well. when I click in it the window shows up for just a fractio of second. then it disapears.
But anyway. I can still use the workbench5.2.33 CE revision 7508 I downloaded.
this is what I've done to imput data from a txt file into a table I created using workbench
I created a table with two columns here. then I entered the following code that, in theory, loads data from external files into the table I just created.

load data infile 'C:/Saga_global/countries.txt' into table test.countries;

The file that contains the data I want to import into Mysql is countries.txt. It contains only two columns: (1) Id_country that contains 4 digit number in each row. (2) countries, that contains the name of a country in each row.

Test is the schema that contains the table countries, which is the table where I want to import the data from the file countries.txt. The table countries also have 2 columns. id_countries that is setted to hold INT data and countries that is setted to hold varchar (45).

However I got the following error message:

Error Code: 1366
Incorrect integer value: '"6569"' for column 'id_country' at row 1
could someone please give mi a hand?. I am going nuts with this!.
chers,

Options: ReplyQuote


Subject
Views
Written By
Posted
import of data from txt files
3587
June 05, 2011 12:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.