Can anyone help?
I have a Mysql database to which I am trying to load data to using a text file derived from excel. When I use the load data infile command to place data into the database it is skipping lots of rows of data with warnings. My Table parameters are: Table book
book_id int(10) not null primary key
book_title varchar(150)
book_price int(4)
subject_id char(2)
author_id varchar(11)
format_id int(1)
publisher_id int(1)
Example data trying to load:
3271997303 ,Introducing Studies Finance Fifth Amendment 2001 Folders, 4320, bu, Q8132324632, 5, 8,
7156212069, When Studies Materials Second Draft 1995 Journal, 7660, bu, L7632463282, 4, 4,
8069956516, Ultimate Studies Agreement Seventh Amendment 2001 Catalogue, 8312, bu, M7732463271, 4, 3,
Example load query
load data local infile 'f:/pract.txt'
into table book
fields terminated by ',';
I think it is something to do with the fields terminated by.
Cheers
I have a Mysql database to which I am trying to load data to using a text file derived from excel. When I use the load data infile command to place data into the database it is skipping lots of rows of data with warnings. My Table parameters are: Table book
book_id int(10) not null primary key
book_title varchar(150)
book_price int(4)
subject_id char(2)
author_id varchar(11)
format_id int(1)
publisher_id int(1)
Example data trying to load:
3271997303 ,Introducing Studies Finance Fifth Amendment 2001 Folders, 4320, bu, Q8132324632, 5, 8,
7156212069, When Studies Materials Second Draft 1995 Journal, 7660, bu, L7632463282, 4, 4,
8069956516, Ultimate Studies Agreement Seventh Amendment 2001 Catalogue, 8312, bu, M7732463271, 4, 3,
Example load query
load data local infile 'f:/pract.txt'
into table book
fields terminated by ',';
I think it is something to do with the fields terminated by.
Cheers