Jump to content

[SOLVED] Need help importing data from txt file


jim.davidson

Recommended Posts

I'm running MySQl 4.1.22

 

I'm trying to import data into a table. I don't get an error, but nothing imports.

 

Table is simple, two fields

client_number  varchar(10)   

client_name  varchar(100)

 

Here is the data

 

"0101","AAUD"

"0102","ABACUS"

"0103","ADVANCED PLUMBING"

"0104","ADVANCED PROCESSES"

"0113","ANDRE INSURANCE"

"0114","ANDERSON CONSTRUCTION"

"0115","ANDERSON INSURANCE"

"0116","ARKWOOD PRODUCTS"

"0117","ARNONI DEVELOPMENT"

"0118","ASOCIATED ACCITUARIES"

"0119","AUGUST  TRUCKING"

"2603","ZAMMERILLA"

   

Here is my query

 

LOAD DATA LOCAL INFILE "C:\client3.txt" INTO TABLE clients FIELDS TERMINATED BY ',' ENCLOSED BY '"'(

client_number, client_name

);

 

Here's the result I get

Inserted rows: -1 (Query took 0.0004 sec)

 

What am I doing wrong?

 

I'm trying to teach myself, but I'm stuck! Any help will be greatly appreciated.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.