I created a database and am trying to load data from a csv spreadsheet file. There is no data in it yet. When i started
LOAD DATA INFILE 'docs.csv' INTO list FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (vendor, title, project, description, shelf);
I get the message " ERROR 1406 (22001): Data is too large for the Provider column in row 1. " However, the provider record in line 1 is 6 characters long. I created the table as follows:
CREATE TABLE list (
autonumber SERIAL,
vendor varchar(50),
title varchar(100),
project varchar(100),
description text,
shelf smallint UNSIGNED,
PRIMARY KEY(autonumber));
There are many commas and carriage returns in the description column (Alt + Enter in the spreadsheet); am I using \ t correctly for the FIELDS TERMINATED command and carriage returns cause problems?
source
share