MySQL Forums
Forum List  »  Quality Assurance

procedure for readimg csv file and loading data to mysql
Posted by: Deepak Nayak
Date: June 04, 2012 02:24AM

i wrote a command to load data from csv file to mysql table . but when i'm writting same command to put it in a store procedure in windows its showing following error.

ERROR 1314: LOAD DATA is not allowed in stored procedures

---------------------------------------------------------------

SQL Statement:

CREATE PROCEDURE `deepak`.`new_routine` ()

BEGIN

LOAD DATA LOCAL INFILE 'C:/Users/pmcs2/Desktop/CUST12.csv'

INTO TABLE cust

FIELDS TERMINATED BY ','

LINES TERMINATED BY '\n' ;

END


-------------------------------

please suggest me what to do.

Options: ReplyQuote


Subject
Views
Written By
Posted
procedure for readimg csv file and loading data to mysql
2764
June 04, 2012 02:24AM


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.