import data from txt files into tables
Hi all,
I am new with MySQL, so probably you'll find my question quite basic. I want to import data from txt files into tables I created for a specific database.
I exported this files from an database I used to administrate in Microsoft Access 2007.
First I created an empty tables with exactly the same structure as the table in my original database in access. Some columns in this table have empty values. Therefore I allowed the table to accept empty values for these columns that I know have empty values. Then I run the following script to import the data
load data infile 'txtfile.txt' into table database.table fields terminated by ',' enclosed by '"' lines terminated by \r\n;
after running this script I get the following error:
Incorrect integer value: '' for column 'elevation' at row 520
it corresponds to a no data value. If I write a number here. then, the script will run until the next empty value. I looks like following this script, I am not allowed to have empty values in the txt file that I wnat to import, though I espcified to allow empty values for this column.
does anyone have any idea of how to overcome this problem?.
Sincerely,
Rodrigo
Subject
Written By
Posted
import data from txt files into tables
June 27, 2011 02:49PM
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.