Page 1 of 1

mysql LOAD DATA issues

Posted: Mon Mar 19, 2007 12:43 pm
by Luke
I'm trying to import data from a csv file with LOAD DATA INFILE For some reason this is not working. It keeps telling me "data too long for column "state" at row 1

Code: Select all

LOAD DATA LOCAL INFILE 'MERGE.TXT'
  REPLACE
  INTO TABLE `members_categories`
  FIELDS
        TERMINATED BY ','
        ENCLOSED BY '"'
  (@killthis, company, address, address2, city, state, zip, @removeme, firstname, lastname, phone, fax, website, email, category, repphone, title, familiar, position, webemail, sortname, repid, memid, status, repfax, bc_specialty, parttime, nomail, nofax, noemail)
Here's a sample row from the import file:

Code: Select all

"","Something","1234 Somewood Drive","","China","WY","12345","Something","","","(530) 222-1111","(530)999-1234","","someemail@aol.com","Accounting","","","","","someemail@aol.com","John Eaton, CPA",2230,1877,"A","",0,4,2,No,No,No
I'm on Mysql 5.0.19-standard. The manual said something about the SET functionality not working before 5.0.3
, but I'm not using that. Any ideas? :?

Posted: Mon Mar 19, 2007 1:11 pm
by feyd
Table schema?