MySQL Forums
Forum List  »  IBM DB2

load data infile
Posted by: junaid khan
Date: July 16, 2008 03:14AM

Hi
i want to read data from text file which is on ftp server & store it in MySQL DB.
For ex mytextfile contains

data1 data2 data3
data4 data5 data6

all data are tab seprated.i have written below query to read textfile & load it in mysql DB.but it is not aading first fields of each row into database.but as soon as i gave tab on first field also then it is working fine.i m not getting where i m wrong please help.
thnks in adv.

load data infile 'mytextfile.txt' into table mytable FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n'



Edited 2 time(s). Last edit at 07/16/2008 03:17AM by junaid khan.

Options: ReplyQuote


Subject
Views
Written By
Posted
load data infile
8861
July 16, 2008 03:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.