If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Load data into SQL from csv

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-18-11, 10:46
Mabel Mabel is offline
Registered User
 
Join Date: Dec 2010
Posts: 4
Load data into SQL from csv

Hi all,
I need to import data from csv to sql table.
I tried this but this is showing error near the path of the file.can any one tell what is missing or what is wrong in the below query

LOAD DATA INFILE "c:\test.csv" INTO TABLE F43121
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-18-11, 10:54
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,535
if you go to the page in da manual for the LOAD DATA command, you will find this small piece of advice:
Quote:
Note that Windows pathnames are specified using forward slashes rather than backslashes. If you do use backslashes, you must double them.
easy to miss, i know
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On