Jump to content

LOAD DATA


kirk112

Recommended Posts

Hi

 

I have the following query

 

LOAD DATA INFILE 'd:/websites/dev/cm/data/cm_products20080428.php' INTO TABLE cm_products FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '"' LINES TERMINATED BY '\r\n' (
url, category_1, category_2, category_3, manufacturer, product_code, product_name, product_description, small_image, price) 

 

which imports the data from a file but I want to ignore the first line ('\r\n' IGNORE 1 LINES ...)  but as soon as I add this to the query no information is imported.  I have add a sample of the imformation to be imported below

 

"url","category 1","category 2","category 3","manufacturer","product code","product name","product description","small image","price"

"www.example.com","Toner Cartridges","Lexmark","Lexmark E320","Lexmark","08A0475","Lexmark","Description","image","75.38"

"www.example.com","Toner Cartridges","Lexmark","Lexmark E320","Lexmark","08A0475","Lexmark","Description","image","75.38"

"www.example.com","Toner Cartridges","Lexmark","Lexmark E320","Lexmark","08A0475","Lexmark","Description","image","75.38"

 

Any ideas why it's not importing the data the I ask it to ignore the first line

 

Thanks for your help

 

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.